Since the change is so small, how about we just add a Kconfig option to select the 2D2 variant of the board.
Or handle this even simpler yet: put both table entries for devices 0A _and_ 0E in, increase IRQ_SLOT_COUNT to 7 and call the thing ALIX 2Dx.
AFAIK an IRQ routing table entry gets ignored anyway if the appropriate device is not there, so the extra entry won't hurt either variant.
Cheers, Jens
On Tue, Aug 31, 2010 at 10:29 AM, Jens Rottmann JRottmann@lippertembedded.de wrote:
Since the change is so small, how about we just add a Kconfig option to select the 2D2 variant of the board.
Or handle this even simpler yet: put both table entries for devices 0A _and_ 0E in, increase IRQ_SLOT_COUNT to 7 and call the thing ALIX 2Dx.
That would be even better. I don't have the hardware to test, so I wanted to make sure I didn't break anything. Anyone have 2D3 to test?
Thanks, Myles
On Tue, Aug 31, 2010 at 6:32 PM, Myles Watson mylesgw@gmail.com wrote:
On Tue, Aug 31, 2010 at 10:29 AM, Jens Rottmann JRottmann@lippertembedded.de wrote:
Since the change is so small, how about we just add a Kconfig option to select the 2D2 variant of the board.
Or handle this even simpler yet: put both table entries for devices 0A _and_ 0E in, increase IRQ_SLOT_COUNT to 7 and call the thing ALIX 2Dx.
That would be even better. I don't have the hardware to test, so I wanted to make sure I didn't break anything. Anyone have 2D3 to test?
I have one, and I initially made the support in v4, so I expect to be able to repair if it breaks. I have a patch to submit soon, and will re-test with a 2D13 before that. Feel free to commit.
Thanks :)
I have one, and I initially made the support in v4, so I expect to be able to repair if it breaks. I have a patch to submit soon, and will re-test with a 2D13 before that. Feel free to commit.
Good to know.
Thanks, Myles
I wrote:
AFAIK an IRQ routing table entry gets ignored anyway if the appropriate device is not there
Myles wrote:
I wanted to make sure I didn't break anything.
If it wasn't ignored, wouldn't you have to recompile your BIOS every time you added a PCI card to your computer or pulled one out? Wouldn't in that case boards only work if _all_ PCI connectors were in use.
A nonexisting NIC is no different than a PCI connector with nothing in it. From the system's point of view, it's just _nothing_ connected to the PCI bus.
Cheers, Jens
On Tue, Aug 31, 2010 at 10:50 AM, Jens Rottmann JRottmann@lippertembedded.de wrote:
I wrote:
AFAIK an IRQ routing table entry gets ignored anyway if the appropriate device is not there
Myles wrote:
I wanted to make sure I didn't break anything.
If it wasn't ignored, wouldn't you have to recompile your BIOS every time you added a PCI card to your computer or pulled one out? Wouldn't in that case boards only work if _all_ PCI connectors were in use.
A nonexisting NIC is no different than a PCI connector with nothing in it. From the system's point of view, it's just _nothing_ connected to the PCI bus.
Absolutely right.
Here's your suggestion as a patch. (still needs an Acked-by:)
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Myles wrote:
Here's your suggestion as a patch.
Hmm ... I'd even go a bit further and also rename the BOARD_PCENGINES_ALIX2D3 option, change MAINBOARD_PART_NUMBER and rename the whole directory to keep everything consistent.
What do you think about this (attached)? (Renaming of the alix2d3/ directory to alix2d/ is not included in the patch, please do this manually before applying.)
Signed-off-by: Jens Rottmann JRottmann@LiPPERTEmbedded.de
Cheers, Jens
diff -urN rev 5758/src/mainboard/pcengines/Kconfig working copy/src/mainboard/pcengines/Kconfig --- rev 5758/src/mainboard/pcengines/Kconfig 2010-08-30 18:36:51.000000000 +0200 +++ working copy/src/mainboard/pcengines/Kconfig 2010-08-31 20:22:06.000000000 +0200 @@ -5,13 +5,13 @@
config BOARD_PCENGINES_ALIX1C bool "ALIX.1C" -config BOARD_PCENGINES_ALIX2D3 - bool "ALIX.2D3" +config BOARD_PCENGINES_ALIX2D + bool "ALIX.2D2 or 2D3"
endchoice
source "src/mainboard/pcengines/alix1c/Kconfig" -source "src/mainboard/pcengines/alix2d3/Kconfig" +source "src/mainboard/pcengines/alix2d/Kconfig"
config MAINBOARD_VENDOR string diff -urN rev 5758/src/mainboard/pcengines/alix2d/Kconfig working copy/src/mainboard/pcengines/alix2d/Kconfig --- rev 5758/src/mainboard/pcengines/alix2d/Kconfig 2010-08-30 19:53:13.000000000 +0200 +++ working copy/src/mainboard/pcengines/alix2d/Kconfig 2010-08-31 20:24:28.000000000 +0200 @@ -1,4 +1,4 @@ -if BOARD_PCENGINES_ALIX2D3 +if BOARD_PCENGINES_ALIX2D
config BOARD_SPECIFIC_OPTIONS # dummy def_bool y @@ -14,18 +14,18 @@
config MAINBOARD_DIR string - default pcengines/alix2d3 + default pcengines/alix2d
config MAINBOARD_PART_NUMBER string - default "ALIX.2D3" + default "ALIX.2D"
config IRQ_SLOT_COUNT int - default 6 + default 7
config RAMBASE hex default 0x4000
-endif # BOARD_PCENGINES_ALIX2D3 +endif # BOARD_PCENGINES_ALIX2D diff -urN rev 5758/src/mainboard/pcengines/alix2d/irq_tables.c working copy/src/mainboard/pcengines/alix2d/irq_tables.c --- rev 5758/src/mainboard/pcengines/alix2d/irq_tables.c 2010-08-24 14:58:17.000000000 +0200 +++ working copy/src/mainboard/pcengines/alix2d/irq_tables.c 2010-08-31 20:26:36.000000000 +0200 @@ -94,7 +94,7 @@ /* On-board ethernet (Left) */ {0x00, (0x09 << 3) | 0x0, {{L_PIRQB, M_PIRQB}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
- /* On-board ethernet (Middle) */ + /* On-board ethernet (Middle, ALIX.2D3 only) */ {0x00, (0x0A << 3) | 0x0, {{L_PIRQC, M_PIRQC}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
/* On-board ethernet (Right) */ @@ -103,6 +103,9 @@ /* Mini PCI (slot 1) */ {0x00, (0x0C << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
+ /* Mini PCI (slot 2, ALIX.2D2 only) */ + {0x00, (0x0E << 3) | 0x0, {{L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0}, + /* Chipset slots -- f.3 wires to B, and f.4 and f.5 wires to D. */ {0x00, (0x0F << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}, {L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}}, 0x0, 0x0}, } diff -urN rev 5758/src/mainboard/pcengines/alix2d/mainboard.c working copy/src/mainboard/pcengines/alix2d/mainboard.c --- rev 5758/src/mainboard/pcengines/alix2d/mainboard.c 2010-08-24 14:58:17.000000000 +0200 +++ working copy/src/mainboard/pcengines/alix2d/mainboard.c 2010-08-31 20:19:37.000000000 +0200 @@ -23,8 +23,8 @@
static void init(struct device *dev) { - printk(BIOS_DEBUG, "ALIX.2D3 ENTER %s\n", __func__); - printk(BIOS_DEBUG, "ALIX.2D3 EXIT %s\n", __func__); + printk(BIOS_DEBUG, "ALIX.2D ENTER %s\n", __func__); + printk(BIOS_DEBUG, "ALIX.2D EXIT %s\n", __func__); }
static void enable_dev(struct device *dev) @@ -33,7 +33,7 @@ }
struct chip_operations mainboard_ops = { - CHIP_NAME("PC Engines ALIX.2D3 Mainboard") + CHIP_NAME("PC Engines ALIX.2D Mainboard") .enable_dev = enable_dev, };
diff -urN rev 5758/src/mainboard/pcengines/alix2d/romstage.c working copy/src/mainboard/pcengines/alix2d/romstage.c --- rev 5758/src/mainboard/pcengines/alix2d/romstage.c 2010-08-24 14:58:17.000000000 +0200 +++ working copy/src/mainboard/pcengines/alix2d/romstage.c 2010-08-31 20:26:55.000000000 +0200 @@ -35,7 +35,7 @@
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
-/* The ALIX.2D3 has no SMBus; the setup is hard-wired. */ +/* The ALIX.2D has no SMBus; the setup is hard-wired. */ static void cs5536_enable_smbus(void) { }
Hmm ... I'd even go a bit further and also rename the BOARD_PCENGINES_ALIX2D3 option, change MAINBOARD_PART_NUMBER and rename the whole directory to keep everything consistent.
What do you think about this (attached)? (Renaming of the alix2d3/ directory to alix2d/ is not included in the patch, please do this manually before applying.)
Signed-off-by: Jens Rottmann JRottmann@LiPPERTEmbedded.de
Rev 5759.
Thanks, Myles
Jens Rottmann wrote:
What do you think about this (attached)? (Renaming of the alix2d3/ directory to alix2d/ is not included in the patch, please do this manually before applying.)
Maybe even ALIX.2 and alix2 if it turns out .2Cx works too, which wouldn't surprise me.
//Peter