summaryrefslogtreecommitdiff
path: root/src/mainboard/roda
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/roda')
-rw-r--r--src/mainboard/roda/rk886ex/irq_tables.c40
-rw-r--r--src/mainboard/roda/rk886ex/m3885.c6
-rw-r--r--src/mainboard/roda/rk886ex/m3885.h76
-rw-r--r--src/mainboard/roda/rk886ex/mainboard.c6
-rw-r--r--src/mainboard/roda/rk886ex/romstage.c4
5 files changed, 66 insertions, 66 deletions
diff --git a/src/mainboard/roda/rk886ex/irq_tables.c b/src/mainboard/roda/rk886ex/irq_tables.c
index 90ab6b0a3c..f6d02f8c45 100644
--- a/src/mainboard/roda/rk886ex/irq_tables.c
+++ b/src/mainboard/roda/rk886ex/irq_tables.c
@@ -21,7 +21,7 @@ static const struct irq_routing_table intel_irq_routing_table = {
PIRQ_VERSION, /* u16 version */
32+16*18, /* There can be total 18 devices on the bus */
0x00, /* Where the interrupt router lies (bus) */
- (0x1f<<3)|0x0, /* Where the interrupt router lies (dev) */
+ (0x1f << 3)|0x0, /* Where the interrupt router lies (dev) */
0, /* IRQs devoted exclusively to PCI usage */
0x8086, /* Vendor */
0x27b0, /* Device */
@@ -29,25 +29,25 @@ static const struct irq_routing_table intel_irq_routing_table = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */
0xf, /* u8 checksum. */
{
- /* bus, dev|fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */
- {0x00,(0x01<<3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x0, 0x0}, // PCIe?
- {0x00,(0x02<<3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // VGA
- {0x00,(0x1e<<3)|0x0, {{0x61, 0xdcf8}, {0x68, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // PCI bridge
- {0x00,(0x1f<<3)|0x0, {{0x62, 0xdcf8}, {0x63, 0xdcd8}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // LPC
- {0x00,(0x1d<<3)|0x0, {{0x6b, 0xdcf8}, {0x63, 0xdcd8}, {0x62, 0xdcf8}, {0x60, 0x0dcf8}}, 0x0, 0x0}, // USB#1
- {0x00,(0x1b<<3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // Audio device
- {0x00,(0x1c<<3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x2, 0x0}, // PCIe bridge
- {0x04,(0x00<<3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // Firewire
- {0x04,(0x01<<3)|0x0, {{0x68, 0xdcf8}, {0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0x0dcf8}}, 0x1, 0x0}, // PCI Bridge
- {0x04,(0x02<<3)|0x0, {{0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0x0dcf8}}, 0x2, 0x0},
- {0x04,(0x03<<3)|0x0, {{0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0xdcf8}, {0x69, 0x0dcf8}}, 0x3, 0x0},
- {0x04,(0x04<<3)|0x0, {{0x6b, 0xdcf8}, {0x68, 0xdcf8}, {0x69, 0xdcf8}, {0x6a, 0x0dcf8}}, 0x4, 0x0},
- {0x04,(0x05<<3)|0x0, {{0x63, 0xdcd8}, {0x62, 0xdcf8}, {0x61, 0xdcf8}, {0x60, 0x0dcf8}}, 0x5, 0x0},
- {0x04,(0x06<<3)|0x0, {{0x62, 0xdcf8}, {0x61, 0xdcf8}, {0x60, 0xdcf8}, {0x63, 0x0dcd8}}, 0x6, 0x0},
- {0x04,(0x09<<3)|0x0, {{0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0x0dcf8}}, 0x9, 0x0},
- {0x01,(0x00<<3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x0, 0x0}, // Ethernet 8168
- {0x02,(0x00<<3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x9, 0x0},
- {0x03,(0x00<<3)|0x0, {{0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0xdcd8}, {0x60, 0x0dcf8}}, 0xa, 0x0},
+ /* bus, dev|fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */
+ {0x00,(0x01 << 3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x0, 0x0}, // PCIe?
+ {0x00,(0x02 << 3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // VGA
+ {0x00,(0x1e << 3)|0x0, {{0x61, 0xdcf8}, {0x68, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // PCI bridge
+ {0x00,(0x1f << 3)|0x0, {{0x62, 0xdcf8}, {0x63, 0xdcd8}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // LPC
+ {0x00,(0x1d << 3)|0x0, {{0x6b, 0xdcf8}, {0x63, 0xdcd8}, {0x62, 0xdcf8}, {0x60, 0x0dcf8}}, 0x0, 0x0}, // USB#1
+ {0x00,(0x1b << 3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // Audio device
+ {0x00,(0x1c << 3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x2, 0x0}, // PCIe bridge
+ {0x04,(0x00 << 3)|0x0, {{0x60, 0xdcf8}, {0x00, 0x0000}, {0x00, 0x0000}, {0x00, 0x00000}}, 0x0, 0x0}, // Firewire
+ {0x04,(0x01 << 3)|0x0, {{0x68, 0xdcf8}, {0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0x0dcf8}}, 0x1, 0x0}, // PCI Bridge
+ {0x04,(0x02 << 3)|0x0, {{0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0x0dcf8}}, 0x2, 0x0},
+ {0x04,(0x03 << 3)|0x0, {{0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0xdcf8}, {0x69, 0x0dcf8}}, 0x3, 0x0},
+ {0x04,(0x04 << 3)|0x0, {{0x6b, 0xdcf8}, {0x68, 0xdcf8}, {0x69, 0xdcf8}, {0x6a, 0x0dcf8}}, 0x4, 0x0},
+ {0x04,(0x05 << 3)|0x0, {{0x63, 0xdcd8}, {0x62, 0xdcf8}, {0x61, 0xdcf8}, {0x60, 0x0dcf8}}, 0x5, 0x0},
+ {0x04,(0x06 << 3)|0x0, {{0x62, 0xdcf8}, {0x61, 0xdcf8}, {0x60, 0xdcf8}, {0x63, 0x0dcd8}}, 0x6, 0x0},
+ {0x04,(0x09 << 3)|0x0, {{0x69, 0xdcf8}, {0x6a, 0xdcf8}, {0x6b, 0xdcf8}, {0x68, 0x0dcf8}}, 0x9, 0x0},
+ {0x01,(0x00 << 3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x0, 0x0}, // Ethernet 8168
+ {0x02,(0x00 << 3)|0x0, {{0x60, 0xdcf8}, {0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0x0dcd8}}, 0x9, 0x0},
+ {0x03,(0x00 << 3)|0x0, {{0x61, 0xdcf8}, {0x62, 0xdcf8}, {0x63, 0xdcd8}, {0x60, 0x0dcf8}}, 0xa, 0x0},
}
};
diff --git a/src/mainboard/roda/rk886ex/m3885.c b/src/mainboard/roda/rk886ex/m3885.c
index 6a9b26c6fb..d5a2b70a6d 100644
--- a/src/mainboard/roda/rk886ex/m3885.c
+++ b/src/mainboard/roda/rk886ex/m3885.c
@@ -240,7 +240,7 @@ void m3885_configure_multikey(void)
m3885_set_variable(0x0c, kstate5_flags & ~(7 << 4));
/* Write Matrix to bank 0 */
- for (i=0; i < ARRAY_SIZE(matrix); i++) {
+ for (i = 0; i < ARRAY_SIZE(matrix); i++) {
m3885_set_proc_ram(i + 0x80, matrix[i]);
}
@@ -257,7 +257,7 @@ void m3885_configure_multikey(void)
printk(BIOS_DEBUG, "M388x does not have a valid RAM offset (0x%x)\n", offs);
} else {
printk(BIOS_DEBUG, "Writing Fn-Table to M388x RAM offset 0x%x\n", offs);
- for (i=0; i < ARRAY_SIZE(function_ram); i++) {
+ for (i = 0; i < ARRAY_SIZE(function_ram); i++) {
m3885_set_proc_ram(i + offs, function_ram[i]);
}
}
@@ -269,7 +269,7 @@ void m3885_configure_multikey(void)
m3885_set_variable(0x0c, kstate5_flags);
maxvars = m3885_get_variable(0x00);
printk(BIOS_DEBUG, "M388x has %d variables in original bank.\n", maxvars);
- for (i=0; i<ARRAY_SIZE(variables); i+=3) {
+ for (i = 0; i < ARRAY_SIZE(variables); i+=3) {
if(variables[i + 0] > maxvars)
continue;
reg8 = m3885_get_variable(variables[i + 0]);
diff --git a/src/mainboard/roda/rk886ex/m3885.h b/src/mainboard/roda/rk886ex/m3885.h
index 0fb8294291..d2dcb146a7 100644
--- a/src/mainboard/roda/rk886ex/m3885.h
+++ b/src/mainboard/roda/rk886ex/m3885.h
@@ -21,50 +21,50 @@
#define M3885_CMDAT2 0x06
#define M3885_CMDAT3 0x07
-#define M3885_GPIO_LEVEL (0<<7)
-#define M3885_GPIO_PULSE (1<<7)
+#define M3885_GPIO_LEVEL (0 << 7)
+#define M3885_GPIO_PULSE (1 << 7)
-#define M3885_GPIO_READ (0<<5)
-#define M3885_GPIO_SET (1<<5)
-#define M3885_GPIO_CLEAR (2<<5)
-#define M3885_GPIO_TOGGLE (3<<5)
+#define M3885_GPIO_READ (0 << 5)
+#define M3885_GPIO_SET (1 << 5)
+#define M3885_GPIO_CLEAR (2 << 5)
+#define M3885_GPIO_TOGGLE (3 << 5)
-#define M3885_GPIO_P14 (0x00<<0)
-#define M3885_GPIO_P15 (0x01<<0)
-#define M3885_GPIO_P16 (0x02<<0)
-#define M3885_GPIO_P17 (0x03<<0)
+#define M3885_GPIO_P14 (0x00 << 0)
+#define M3885_GPIO_P15 (0x01 << 0)
+#define M3885_GPIO_P16 (0x02 << 0)
+#define M3885_GPIO_P17 (0x03 << 0)
-#define M3885_GPIO_P54 (0x04<<0)
-#define M3885_GPIO_P55 (0x05<<0)
-#define M3885_GPIO_P56 (0x06<<0)
-#define M3885_GPIO_P57 (0x07<<0)
+#define M3885_GPIO_P54 (0x04 << 0)
+#define M3885_GPIO_P55 (0x05 << 0)
+#define M3885_GPIO_P56 (0x06 << 0)
+#define M3885_GPIO_P57 (0x07 << 0)
-#define M3885_GPIO_P20 (0x08<<0)
-#define M3885_GPIO_P21 (0x09<<0)
-#define M3885_GPIO_P22 (0x0a<<0)
-#define M3885_GPIO_P23 (0x0b<<0)
-#define M3885_GPIO_P24 (0x0c<<0)
-#define M3885_GPIO_P25 (0x0d<<0)
-#define M3885_GPIO_P26 (0x0e<<0)
-#define M3885_GPIO_P27 (0x0f<<0)
+#define M3885_GPIO_P20 (0x08 << 0)
+#define M3885_GPIO_P21 (0x09 << 0)
+#define M3885_GPIO_P22 (0x0a << 0)
+#define M3885_GPIO_P23 (0x0b << 0)
+#define M3885_GPIO_P24 (0x0c << 0)
+#define M3885_GPIO_P25 (0x0d << 0)
+#define M3885_GPIO_P26 (0x0e << 0)
+#define M3885_GPIO_P27 (0x0f << 0)
-#define M3885_GPIO_P40 (0x10<<0)
-#define M3885_GPIO_P41 (0x11<<0)
-#define M3885_GPIO_P42 (0x12<<0)
-#define M3885_GPIO_P43 (0x13<<0)
-#define M3885_GPIO_P44 (0x14<<0)
-#define M3885_GPIO_P45 (0x15<<0)
-#define M3885_GPIO_P46 (0x16<<0)
-#define M3885_GPIO_P47 (0x17<<0)
+#define M3885_GPIO_P40 (0x10 << 0)
+#define M3885_GPIO_P41 (0x11 << 0)
+#define M3885_GPIO_P42 (0x12 << 0)
+#define M3885_GPIO_P43 (0x13 << 0)
+#define M3885_GPIO_P44 (0x14 << 0)
+#define M3885_GPIO_P45 (0x15 << 0)
+#define M3885_GPIO_P46 (0x16 << 0)
+#define M3885_GPIO_P47 (0x17 << 0)
-#define M3885_GPIO_P60 (0x18<<0)
-#define M3885_GPIO_P61 (0x19<<0)
-#define M3885_GPIO_P62 (0x1a<<0)
-#define M3885_GPIO_P63 (0x1b<<0)
-#define M3885_GPIO_P64 (0x1c<<0)
-#define M3885_GPIO_P65 (0x1d<<0)
-#define M3885_GPIO_P66 (0x1e<<0)
-#define M3885_GPIO_P67 (0x1f<<0)
+#define M3885_GPIO_P60 (0x18 << 0)
+#define M3885_GPIO_P61 (0x19 << 0)
+#define M3885_GPIO_P62 (0x1a << 0)
+#define M3885_GPIO_P63 (0x1b << 0)
+#define M3885_GPIO_P64 (0x1c << 0)
+#define M3885_GPIO_P65 (0x1d << 0)
+#define M3885_GPIO_P66 (0x1e << 0)
+#define M3885_GPIO_P67 (0x1f << 0)
void m3885_configure_multikey(void);
u8 m3885_gpio(u8 value);
diff --git a/src/mainboard/roda/rk886ex/mainboard.c b/src/mainboard/roda/rk886ex/mainboard.c
index 1ef24975fb..1959c3251c 100644
--- a/src/mainboard/roda/rk886ex/mainboard.c
+++ b/src/mainboard/roda/rk886ex/mainboard.c
@@ -35,7 +35,7 @@ static void backlight_enable(void)
/* P56 is Brightness Up, and it needs a Pulse instead of a
* Level
*/
- for (i=0; i < 28; i++) {
+ for (i = 0; i < 28; i++) {
//m3885_gpio(M3885_GPIO_PULSE|M3885_GPIO_SET|M3885_GPIO_P56);
m3885_gpio(M3885_GPIO_PULSE|M3885_GPIO_TOGGLE|M3885_GPIO_P56);
}
@@ -49,10 +49,10 @@ static void dump_runtime_registers(void)
int i;
printk(BIOS_DEBUG, "SuperIO runtime register block:\n");
- for (i=0; i<0x10; i++)
+ for (i = 0; i < 0x10; i++)
printk(BIOS_DEBUG, "%02x ", i);
printk(BIOS_DEBUG, "\n");
- for (i=0; i<0x10; i++)
+ for (i = 0; i < 0x10; i++)
printk(BIOS_DEBUG, "%02x ", inb(0x600 +i));
printk(BIOS_DEBUG, "\n");
}
diff --git a/src/mainboard/roda/rk886ex/romstage.c b/src/mainboard/roda/rk886ex/romstage.c
index f3af5fa6a0..8de4665dd9 100644
--- a/src/mainboard/roda/rk886ex/romstage.c
+++ b/src/mainboard/roda/rk886ex/romstage.c
@@ -68,7 +68,7 @@ static void ich7_enable_lpc(void)
{
int lpt_en = 0;
if (read_option(lpt, 0) != 0) {
- lpt_en = 1<<2; // enable LPT
+ lpt_en = 1 << 2; // enable LPT
}
// Enable Serial IRQ
pci_write_config8(PCI_DEV(0, 0x1f, 0), 0x64, 0xd0);
@@ -113,7 +113,7 @@ static void early_superio_config(void)
{
device_t dev;
- dev=PNP_DEV(0x2e, 0x00);
+ dev = PNP_DEV(0x2e, 0x00);
pnp_enter_ext_func_mode(dev);
pnp_write_register(dev, 0x01, 0x94); // Extended Parport modes