bios: fix driver binding order

spi-aspeed-smc driver was bound but spi-nor driver was not bound which
created problems for systems with more than one spi device on the bus.

Update the code to bind spi-nor driver as well for the desired device
and not unbind spi-aspeed-smc driver at the end since other spi devices
may still be in use on that bus.

Tested: bios update proceeds normally

Config which was used:

```
    {
      "FirmwareInfo": {
        "CompatibleHardware": "com.tyan.Hardware.S8030.SPI.Host",
        "VendorIANA": 6653
      },
      "MuxOutputs": [
        {
          "Name": "BMC_SPI_SEL",
          "Polarity": "High"
        }
      ],
      "Name": "HostSPIFlash",
      "SPIControllerIndex": 1,
      "SPIDeviceIndex": 0,
      "Type": "SPIFlash",
    }
```

SPI controller driver says bound throughout the update process

```
root@s8030-bmc-30303035c0c1:/sys/bus/platform# ls /sys/bus/platform/drivers/spi-aspeed-smc/
1e620000.spi  1e630000.spi  bind          uevent        unbind
```

and SPI flash driver (spi-nor) is bound and then unbound after the
update process.

```
root@s8030-bmc-30303035c0c1:/sys/bus/platform# ls /sys/bus/spi/drivers/spi-nor/
bind    spi0.0  spi1.0  uevent  unbind
root@s8030-bmc-30303035c0c1:/sys/bus/platform# ls /sys/bus/spi/drivers/spi-nor/
bind    spi0.0  uevent  unbind
```

Change-Id: I874670f9fd27f6642359ea078e6e9db4c1b9e249
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2 files changed
tree: 4071d8407ba886cc1e27d03d16482745432a0544
  1. bios/
  2. bmc/
  3. common/
  4. eeprom-device/
  5. i2c-vr/
  6. subprojects/
  7. test/
  8. .clang-format
  9. .clang-tidy
  10. .gitignore
  11. .shellcheck
  12. LICENSE
  13. meson.build
  14. meson.options
  15. OWNERS
  16. README.md
README.md

phosphor-bmc-code-mgmt

Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture

To Build

To build this package, do the following steps:

  1. meson build
  2. ninja -C build

To clean the repository run rm -r build.