* [PATCH 3/4][SSB] MIPS core flash driver
@ 2007-08-05 23:20 Aurelien Jarno
2007-08-06 8:45 ` Michael Buesch
0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2007-08-05 23:20 UTC (permalink / raw)
To: Michael Buesch, netdev; +Cc: Felix Fietkau
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).
It originally comes from the OpenWrt patches.
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -186,12 +186,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];
+ int flash_buswidth;
u32 flash_window;
u32 flash_window_size;
};
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 3/4][SSB] MIPS core flash driver
2007-08-05 23:20 [PATCH 3/4][SSB] MIPS core flash driver Aurelien Jarno
@ 2007-08-06 8:45 ` Michael Buesch
0 siblings, 0 replies; 2+ messages in thread
From: Michael Buesch @ 2007-08-06 8:45 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: netdev, Felix Fietkau
On Monday 06 August 2007, Aurelien Jarno wrote:
> 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).
>
> It originally comes from the OpenWrt patches.
>
> Cc: Felix Fietkau <nbd@openwrt.org>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> --- a/drivers/ssb/driver_mipscore.c
> +++ b/drivers/ssb/driver_mipscore.c
> @@ -186,12 +186,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];
>
> + int flash_buswidth;
u8 please (although it doesn't save space in this case (padding)),
but the struct could be reorganized to save space later.
> u32 flash_window;
> u32 flash_window_size;
> };
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-06 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-05 23:20 [PATCH 3/4][SSB] MIPS core flash driver Aurelien Jarno
2007-08-06 8:45 ` Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).