[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070806150552.GD24308@hall.aurel32.net>
Date: Mon, 6 Aug 2007 17:05:52 +0200
From: Aurelien Jarno <aurelien@...el32.net>
To: Michael Buesch <mb@...sch.de>, netdev@...r.kernel.org
Cc: Felix Fietkau <nbd@...nwrt.org>
Subject: [PATCH 3/3] Add buswidth to SSB MIPS core flash driver
The patch below against 2.6.23-rc1-mm2 fixes the size of the flash
window and detect the width of the flash bus (8 or 16 bits).
Cc: Felix Fietkau <nbd@...nwrt.org>
Signed-off-by: Aurelien Jarno <aurelien@...el32.net>
--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -133,12 +133,16 @@
{
struct ssb_bus *bus = mcore->dev->bus;
+ mcore->flash_buswidth = 2;
if (bus->chipco.dev) {
mcore->flash_window = 0x1c000000;
- mcore->flash_window_size = 0x800000;
+ mcore->flash_window_size = 0x02000000;
+ if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG)
+ & SSB_CHIPCO_CFG_DS16) == 0)
+ mcore->flash_buswidth = 1;
} else {
mcore->flash_window = 0x1fc00000;
- mcore->flash_window_size = 0x400000;
+ mcore->flash_window_size = 0x00400000;
}
}
--- a/include/linux/ssb/ssb_driver_mips.h
+++ b/include/linux/ssb/ssb_driver_mips.h
@@ -20,6 +20,7 @@
int nr_serial_ports;
struct ssb_serial_port serial_ports[4];
+ u8 flash_buswidth;
u32 flash_window;
u32 flash_window_size;
};
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@...ian.org | aurelien@...el32.net
`- people.debian.org/~aurel32 | www.aurel32.net
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists