cs5536: Remove redundant enable_ide variable from ide device.
The device infrastructure already has an enabled bit, so we don't need to duplicate it in the current form. cs5536.c:ide_init() is phase6_init, which is called only if the device is enabled, so if the device doesn't exist, or the mainboard dts says "disabled;" for it, the init is not done and an extra conditional is not necessary. Adapt all cs5536 using mainboards to it (removing enable_ide variable) - artecgroup/dbe6[12] gets the whole IDE device removed, which results in the ide_init() code not being ran as before (before it was called but early return from enable_ide == 0, now it won't be called in the first place).
Signed-off-by: Mart Raudsepp mart.raudsepp@artecdesign.ee --- mainboard/adl/msm800sev/dts | 1 - mainboard/amd/db800/dts | 1 - mainboard/amd/norwich/dts | 1 - mainboard/amp/tinygx/dts | 1 - mainboard/artecgroup/dbe61/dts | 3 --- mainboard/artecgroup/dbe62/dts | 3 --- mainboard/pcengines/alix1c/dts | 1 - mainboard/pcengines/alix2c3/dts | 1 - southbridge/amd/cs5536/cs5536.c | 7 +------ southbridge/amd/cs5536/ide | 3 --- 10 files changed, 1 insertions(+), 21 deletions(-)
diff --git a/mainboard/adl/msm800sev/dts b/mainboard/adl/msm800sev/dts index 46a2169..12e27a5 100644 --- a/mainboard/adl/msm800sev/dts +++ b/mainboard/adl/msm800sev/dts @@ -39,7 +39,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; ioport@2e { /config/("superio/winbond/w83627hf/dts"); diff --git a/mainboard/amd/db800/dts b/mainboard/amd/db800/dts index dd44487..75da7de 100644 --- a/mainboard/amd/db800/dts +++ b/mainboard/amd/db800/dts @@ -54,7 +54,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; ioport@2e { /config/("superio/winbond/w83627hf/dts"); diff --git a/mainboard/amd/norwich/dts b/mainboard/amd/norwich/dts index 6444e9d..ea7f9c0 100644 --- a/mainboard/amd/norwich/dts +++ b/mainboard/amd/norwich/dts @@ -57,7 +57,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; }; }; diff --git a/mainboard/amp/tinygx/dts b/mainboard/amp/tinygx/dts index 95f3722..75a93b0 100644 --- a/mainboard/amp/tinygx/dts +++ b/mainboard/amp/tinygx/dts @@ -54,7 +54,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; ioport@2e { /config/("superio/ite/it8716f/dts"); diff --git a/mainboard/artecgroup/dbe61/dts b/mainboard/artecgroup/dbe61/dts index 48df288..a6995ce 100644 --- a/mainboard/artecgroup/dbe61/dts +++ b/mainboard/artecgroup/dbe61/dts @@ -112,8 +112,5 @@ end pci@f,1 { /config/("southbridge/amd/cs5536/nand"); }; - pci@f,2 { - /config/("southbridge/amd/cs5536/ide"); - }; }; }; diff --git a/mainboard/artecgroup/dbe62/dts b/mainboard/artecgroup/dbe62/dts index 3cbe0ff..8089e79 100644 --- a/mainboard/artecgroup/dbe62/dts +++ b/mainboard/artecgroup/dbe62/dts @@ -66,8 +66,5 @@ pci@f,1 { /config/("southbridge/amd/cs5536/nand"); }; - pci@f,2 { - /config/("southbridge/amd/cs5536/ide"); - }; }; }; diff --git a/mainboard/pcengines/alix1c/dts b/mainboard/pcengines/alix1c/dts index 724a74f..2f3d767 100644 --- a/mainboard/pcengines/alix1c/dts +++ b/mainboard/pcengines/alix1c/dts @@ -51,7 +51,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; ioport@2e { /config/("superio/winbond/w83627hf/dts"); diff --git a/mainboard/pcengines/alix2c3/dts b/mainboard/pcengines/alix2c3/dts index c1b4d31..30390b5 100644 --- a/mainboard/pcengines/alix2c3/dts +++ b/mainboard/pcengines/alix2c3/dts @@ -51,7 +51,6 @@ }; pci@f,2 { /config/("southbridge/amd/cs5536/ide"); - enable_ide = "1"; }; }; }; diff --git a/southbridge/amd/cs5536/cs5536.c b/southbridge/amd/cs5536/cs5536.c index 0c5adb1..4374a0a 100644 --- a/southbridge/amd/cs5536/cs5536.c +++ b/southbridge/amd/cs5536/cs5536.c @@ -607,7 +607,7 @@ void chipsetinit(void)
/** * Enables the IDE. This is code that is run if there is an ide device in the mainboard - * device tree and it has set non-zero "enable_ide". + * device tree. * * @param dev The device */ @@ -615,11 +615,6 @@ static void ide_init(struct device *dev) { u32 ide_cfg;
- struct southbridge_amd_cs5536_ide_config *ide = - (struct southbridge_amd_cs5536_ide_config *)dev->device_configuration; - if (!ide->enable_ide) - return; - printk(BIOS_DEBUG, "cs5536_ide: %s\n", __func__); /* GPIO and IRQ setup are handled in the main chipset code. */
diff --git a/southbridge/amd/cs5536/ide b/southbridge/amd/cs5536/ide index 42c9d5f..6cc8e2e 100644 --- a/southbridge/amd/cs5536/ide +++ b/southbridge/amd/cs5536/ide @@ -20,7 +20,4 @@
{ device_operations = "cs5536_ide"; - - /* IDE: enable CS5536 IDE. There may be a different IDE controller on board */ - enable_ide = "0"; };