Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
69f34c98
Commit
69f34c98
authored
Nov 07, 2005
by
Thomas Gleixner
Committed by
Thomas Gleixner
Nov 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] maps: Clean up trailing white spaces
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
1f948b43
Changes
61
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
470 additions
and
470 deletions
+470
-470
drivers/mtd/maps/Kconfig
drivers/mtd/maps/Kconfig
+12
-12
drivers/mtd/maps/Makefile
drivers/mtd/maps/Makefile
+2
-2
drivers/mtd/maps/alchemy-flash.c
drivers/mtd/maps/alchemy-flash.c
+6
-6
drivers/mtd/maps/amd76xrom.c
drivers/mtd/maps/amd76xrom.c
+8
-8
drivers/mtd/maps/arctic-mtd.c
drivers/mtd/maps/arctic-mtd.c
+3
-3
drivers/mtd/maps/autcpu12-nvram.c
drivers/mtd/maps/autcpu12-nvram.c
+9
-9
drivers/mtd/maps/bast-flash.c
drivers/mtd/maps/bast-flash.c
+9
-9
drivers/mtd/maps/beech-mtd.c
drivers/mtd/maps/beech-mtd.c
+3
-3
drivers/mtd/maps/cdb89712.c
drivers/mtd/maps/cdb89712.c
+17
-17
drivers/mtd/maps/cfi_flagadm.c
drivers/mtd/maps/cfi_flagadm.c
+6
-6
drivers/mtd/maps/cstm_mips_ixx.c
drivers/mtd/maps/cstm_mips_ixx.c
+12
-12
drivers/mtd/maps/dbox2-flash.c
drivers/mtd/maps/dbox2-flash.c
+19
-19
drivers/mtd/maps/dc21285.c
drivers/mtd/maps/dc21285.c
+17
-17
drivers/mtd/maps/dilnetpc.c
drivers/mtd/maps/dilnetpc.c
+16
-16
drivers/mtd/maps/dmv182.c
drivers/mtd/maps/dmv182.c
+4
-4
drivers/mtd/maps/ebony.c
drivers/mtd/maps/ebony.c
+3
-3
drivers/mtd/maps/edb7312.c
drivers/mtd/maps/edb7312.c
+5
-5
drivers/mtd/maps/epxa10db-flash.c
drivers/mtd/maps/epxa10db-flash.c
+6
-6
drivers/mtd/maps/fortunet.c
drivers/mtd/maps/fortunet.c
+2
-2
drivers/mtd/maps/h720x-flash.c
drivers/mtd/maps/h720x-flash.c
+8
-8
drivers/mtd/maps/ichxrom.c
drivers/mtd/maps/ichxrom.c
+8
-8
drivers/mtd/maps/impa7.c
drivers/mtd/maps/impa7.c
+8
-8
drivers/mtd/maps/integrator-flash.c
drivers/mtd/maps/integrator-flash.c
+7
-7
drivers/mtd/maps/ipaq-flash.c
drivers/mtd/maps/ipaq-flash.c
+17
-17
drivers/mtd/maps/iq80310.c
drivers/mtd/maps/iq80310.c
+2
-2
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/ixp2000.c
+15
-15
drivers/mtd/maps/ixp4xx.c
drivers/mtd/maps/ixp4xx.c
+7
-7
drivers/mtd/maps/l440gx.c
drivers/mtd/maps/l440gx.c
+9
-9
drivers/mtd/maps/lubbock-flash.c
drivers/mtd/maps/lubbock-flash.c
+7
-7
drivers/mtd/maps/mainstone-flash.c
drivers/mtd/maps/mainstone-flash.c
+11
-11
drivers/mtd/maps/mbx860.c
drivers/mtd/maps/mbx860.c
+3
-3
drivers/mtd/maps/mtx-1_flash.c
drivers/mtd/maps/mtx-1_flash.c
+2
-2
drivers/mtd/maps/netsc520.c
drivers/mtd/maps/netsc520.c
+16
-16
drivers/mtd/maps/nettel.c
drivers/mtd/maps/nettel.c
+4
-4
drivers/mtd/maps/ocelot.c
drivers/mtd/maps/ocelot.c
+5
-5
drivers/mtd/maps/octagon-5066.c
drivers/mtd/maps/octagon-5066.c
+18
-18
drivers/mtd/maps/omap-toto-flash.c
drivers/mtd/maps/omap-toto-flash.c
+10
-10
drivers/mtd/maps/omap_nor.c
drivers/mtd/maps/omap_nor.c
+1
-1
drivers/mtd/maps/pci.c
drivers/mtd/maps/pci.c
+3
-3
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/maps/pcmciamtd.c
+15
-15
drivers/mtd/maps/physmap.c
drivers/mtd/maps/physmap.c
+4
-4
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/plat-ram.c
+5
-5
drivers/mtd/maps/pnc2000.c
drivers/mtd/maps/pnc2000.c
+4
-4
drivers/mtd/maps/pq2fads.c
drivers/mtd/maps/pq2fads.c
+7
-7
drivers/mtd/maps/redwood.c
drivers/mtd/maps/redwood.c
+2
-2
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/maps/sa1100-flash.c
+3
-3
drivers/mtd/maps/sbc8240.c
drivers/mtd/maps/sbc8240.c
+2
-2
drivers/mtd/maps/sbc_gxx.c
drivers/mtd/maps/sbc_gxx.c
+23
-23
drivers/mtd/maps/sc520cdp.c
drivers/mtd/maps/sc520cdp.c
+3
-3
drivers/mtd/maps/scx200_docflash.c
drivers/mtd/maps/scx200_docflash.c
+23
-23
drivers/mtd/maps/sharpsl-flash.c
drivers/mtd/maps/sharpsl-flash.c
+6
-6
drivers/mtd/maps/solutionengine.c
drivers/mtd/maps/solutionengine.c
+2
-2
drivers/mtd/maps/sun_uflash.c
drivers/mtd/maps/sun_uflash.c
+6
-6
drivers/mtd/maps/tqm834x.c
drivers/mtd/maps/tqm834x.c
+4
-4
drivers/mtd/maps/tqm8xxl.c
drivers/mtd/maps/tqm8xxl.c
+10
-10
drivers/mtd/maps/ts5500_flash.c
drivers/mtd/maps/ts5500_flash.c
+3
-3
drivers/mtd/maps/tsunami_flash.c
drivers/mtd/maps/tsunami_flash.c
+3
-3
drivers/mtd/maps/uclinux.c
drivers/mtd/maps/uclinux.c
+2
-2
drivers/mtd/maps/vmax301.c
drivers/mtd/maps/vmax301.c
+12
-12
drivers/mtd/maps/walnut.c
drivers/mtd/maps/walnut.c
+8
-8
drivers/mtd/maps/wr_sbc82xx_flash.c
drivers/mtd/maps/wr_sbc82xx_flash.c
+3
-3
No files found.
drivers/mtd/maps/Kconfig
View file @
69f34c98
# drivers/mtd/maps/Kconfig
# drivers/mtd/maps/Kconfig
# $Id: Kconfig,v 1.6
0 2005/11/07 08:33:35
gleixner Exp $
# $Id: Kconfig,v 1.6
1 2005/11/07 11:14:26
gleixner Exp $
menu "Mapping drivers for chip access"
menu "Mapping drivers for chip access"
depends on MTD!=n
depends on MTD!=n
...
@@ -64,9 +64,9 @@ config MTD_SUN_UFLASH
...
@@ -64,9 +64,9 @@ config MTD_SUN_UFLASH
tristate "Sun Microsystems userflash support"
tristate "Sun Microsystems userflash support"
depends on (SPARC32 || SPARC64) && MTD_CFI
depends on (SPARC32 || SPARC64) && MTD_CFI
help
help
This provides a 'mapping' driver which supports the way in
This provides a 'mapping' driver which supports the way in
which user-programmable flash chips are connected on various
which user-programmable flash chips are connected on various
Sun Microsystems boardsets. This driver will require CFI support
Sun Microsystems boardsets. This driver will require CFI support
in the kernel, so if you did not enable CFI previously, do that now.
in the kernel, so if you did not enable CFI previously, do that now.
config MTD_PNC2000
config MTD_PNC2000
...
@@ -89,7 +89,7 @@ config MTD_NETSC520
...
@@ -89,7 +89,7 @@ config MTD_NETSC520
depends on X86 && MTD_CFI && MTD_PARTITIONS
depends on X86 && MTD_CFI && MTD_PARTITIONS
help
help
This enables access routines for the flash chips on the AMD NetSc520
This enables access routines for the flash chips on the AMD NetSc520
demonstration board. If you have one of these boards and would like
demonstration board. If you have one of these boards and would like
to use the flash chips on it, say 'Y'.
to use the flash chips on it, say 'Y'.
config MTD_TS5500
config MTD_TS5500
...
@@ -212,7 +212,7 @@ config MTD_NETtel
...
@@ -212,7 +212,7 @@ config MTD_NETtel
Support for flash chips on NETtel/SecureEdge/SnapGear boards.
Support for flash chips on NETtel/SecureEdge/SnapGear boards.
config MTD_ALCHEMY
config MTD_ALCHEMY
tristate ' AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support'
tristate ' AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support'
depends on SOC_AU1X00
depends on SOC_AU1X00
help
help
Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards
Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards
...
@@ -377,8 +377,8 @@ config MTD_CSTM_MIPS_IXX_START
...
@@ -377,8 +377,8 @@ config MTD_CSTM_MIPS_IXX_START
default "0x8000000"
default "0x8000000"
help
help
This is the physical memory location that the MTD driver will
This is the physical memory location that the MTD driver will
use for the flash chips on your particular target board.
use for the flash chips on your particular target board.
Refer to the memory map which should hopefully be in the
Refer to the memory map which should hopefully be in the
documentation for your board.
documentation for your board.
config MTD_CSTM_MIPS_IXX_LEN
config MTD_CSTM_MIPS_IXX_LEN
...
@@ -386,7 +386,7 @@ config MTD_CSTM_MIPS_IXX_LEN
...
@@ -386,7 +386,7 @@ config MTD_CSTM_MIPS_IXX_LEN
depends on MTD_CSTM_MIPS_IXX
depends on MTD_CSTM_MIPS_IXX
default "0x4000000"
default "0x4000000"
help
help
This is the total length that the MTD driver will use for the
This is the total length that the MTD driver will use for the
flash chips on your particular board. Refer to the memory
flash chips on your particular board. Refer to the memory
map which should hopefully be in the documentation for your
map which should hopefully be in the documentation for your
board.
board.
...
@@ -452,14 +452,14 @@ config MTD_IQ80310
...
@@ -452,14 +452,14 @@ config MTD_IQ80310
depends on MTD_CFI && ARCH_IQ80310
depends on MTD_CFI && ARCH_IQ80310
help
help
This enables access routines for the flash chips on the Intel XScale
This enables access routines for the flash chips on the Intel XScale
IQ80310 evaluation board. If you have one of these boards and would
IQ80310 evaluation board. If you have one of these boards and would
like to use the flash chips on it, say 'Y'.
like to use the flash chips on it, say 'Y'.
config MTD_IXP4XX
config MTD_IXP4XX
tristate "CFI Flash device mapped on Intel IXP4xx based systems"
tristate "CFI Flash device mapped on Intel IXP4xx based systems"
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
help
help
This enables MTD access to flash devices on platforms based
This enables MTD access to flash devices on platforms based
on Intel's IXP4xx family of network processors such as the
on Intel's IXP4xx family of network processors such as the
IXDP425 and Coyote. If you have an IXP4xx based board and
IXDP425 and Coyote. If you have an IXP4xx based board and
would like to use the flash chips on it, say 'Y'.
would like to use the flash chips on it, say 'Y'.
...
@@ -468,7 +468,7 @@ config MTD_IXP2000
...
@@ -468,7 +468,7 @@ config MTD_IXP2000
tristate "CFI Flash device mapped on Intel IXP2000 based systems"
tristate "CFI Flash device mapped on Intel IXP2000 based systems"
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000
help
help
This enables MTD access to flash devices on platforms based
This enables MTD access to flash devices on platforms based
on Intel's IXP2000 family of network processors such as the
on Intel's IXP2000 family of network processors such as the
IXDP425 and Coyote. If you have an IXP2000 based board and
IXDP425 and Coyote. If you have an IXP2000 based board and
would like to use the flash chips on it, say 'Y'.
would like to use the flash chips on it, say 'Y'.
...
...
drivers/mtd/maps/Makefile
View file @
69f34c98
#
#
# linux/drivers/maps/Makefile
# linux/drivers/maps/Makefile
#
#
# $Id: Makefile.common,v 1.3
3 2005/11/07 08:33:35
gleixner Exp $
# $Id: Makefile.common,v 1.3
4 2005/11/07 11:14:26
gleixner Exp $
ifeq
($(CONFIG_MTD_COMPLEX_MAPPINGS),y)
ifeq
($(CONFIG_MTD_COMPLEX_MAPPINGS),y)
obj-$(CONFIG_MTD)
+=
map_funcs.o
obj-$(CONFIG_MTD)
+=
map_funcs.o
...
@@ -26,7 +26,7 @@ obj-$(CONFIG_MTD_MAINSTONE) += mainstone-flash.o
...
@@ -26,7 +26,7 @@ obj-$(CONFIG_MTD_MAINSTONE) += mainstone-flash.o
obj-$(CONFIG_MTD_MBX860)
+=
mbx860.o
obj-$(CONFIG_MTD_MBX860)
+=
mbx860.o
obj-$(CONFIG_MTD_CEIVA)
+=
ceiva.o
obj-$(CONFIG_MTD_CEIVA)
+=
ceiva.o
obj-$(CONFIG_MTD_OCTAGON)
+=
octagon-5066.o
obj-$(CONFIG_MTD_OCTAGON)
+=
octagon-5066.o
obj-$(CONFIG_MTD_PHYSMAP)
+=
physmap.o
obj-$(CONFIG_MTD_PHYSMAP)
+=
physmap.o
obj-$(CONFIG_MTD_PNC2000)
+=
pnc2000.o
obj-$(CONFIG_MTD_PNC2000)
+=
pnc2000.o
obj-$(CONFIG_MTD_PCMCIA)
+=
pcmciamtd.o
obj-$(CONFIG_MTD_PCMCIA)
+=
pcmciamtd.o
obj-$(CONFIG_MTD_RPXLITE)
+=
rpxlite.o
obj-$(CONFIG_MTD_RPXLITE)
+=
rpxlite.o
...
...
drivers/mtd/maps/alchemy-flash.c
View file @
69f34c98
/*
/*
* Flash memory access on AMD Alchemy evaluation boards
* Flash memory access on AMD Alchemy evaluation boards
*
*
* $Id: alchemy-flash.c,v 1.
1 2005/02/27 21:50:21 ppopov
Exp $
* $Id: alchemy-flash.c,v 1.
2 2005/11/07 11:14:26 gleixner
Exp $
*
*
* (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
* (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
*
*
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#ifdef DEBUG_RW
#ifdef DEBUG_RW
#define DBG(x...) printk(x)
#define DBG(x...) printk(x)
#else
#else
#define DBG(x...)
#define DBG(x...)
#endif
#endif
#ifdef CONFIG_MIPS_PB1000
#ifdef CONFIG_MIPS_PB1000
...
@@ -136,7 +136,7 @@ int __init alchemy_mtd_init(void)
...
@@ -136,7 +136,7 @@ int __init alchemy_mtd_init(void)
int
nb_parts
=
0
;
int
nb_parts
=
0
;
unsigned
long
window_addr
;
unsigned
long
window_addr
;
unsigned
long
window_size
;
unsigned
long
window_size
;
/* Default flash buswidth */
/* Default flash buswidth */
alchemy_map
.
bankwidth
=
BOARD_FLASH_WIDTH
;
alchemy_map
.
bankwidth
=
BOARD_FLASH_WIDTH
;
...
@@ -161,7 +161,7 @@ int __init alchemy_mtd_init(void)
...
@@ -161,7 +161,7 @@ int __init alchemy_mtd_init(void)
* Now let's probe for the actual flash. Do it here since
* Now let's probe for the actual flash. Do it here since
* specific machine settings might have been set above.
* specific machine settings might have been set above.
*/
*/
printk
(
KERN_NOTICE
BOARD_MAP_NAME
": probing %d-bit flash bus
\n
"
,
printk
(
KERN_NOTICE
BOARD_MAP_NAME
": probing %d-bit flash bus
\n
"
,
alchemy_map
.
bankwidth
*
8
);
alchemy_map
.
bankwidth
*
8
);
alchemy_map
.
virt
=
ioremap
(
window_addr
,
window_size
);
alchemy_map
.
virt
=
ioremap
(
window_addr
,
window_size
);
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
alchemy_map
);
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
alchemy_map
);
...
...
drivers/mtd/maps/amd76xrom.c
View file @
69f34c98
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* amd76xrom.c
* amd76xrom.c
*
*
* Normal mappings of chips in physical memory
* Normal mappings of chips in physical memory
* $Id: amd76xrom.c,v 1.2
0 2005/03/18 14:04:35
gleixner Exp $
* $Id: amd76xrom.c,v 1.2
1 2005/11/07 11:14:26
gleixner Exp $
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -70,7 +70,7 @@ static void amd76xrom_cleanup(struct amd76xrom_window *window)
...
@@ -70,7 +70,7 @@ static void amd76xrom_cleanup(struct amd76xrom_window *window)
list_del
(
&
map
->
list
);
list_del
(
&
map
->
list
);
kfree
(
map
);
kfree
(
map
);
}
}
if
(
window
->
rsrc
.
parent
)
if
(
window
->
rsrc
.
parent
)
release_resource
(
&
window
->
rsrc
);
release_resource
(
&
window
->
rsrc
);
if
(
window
->
virt
)
{
if
(
window
->
virt
)
{
...
@@ -107,7 +107,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
...
@@ -107,7 +107,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
window
->
phys
=
0xffff0000
;
/* 64KiB */
window
->
phys
=
0xffff0000
;
/* 64KiB */
}
}
window
->
size
=
0xffffffffUL
-
window
->
phys
+
1UL
;
window
->
size
=
0xffffffffUL
-
window
->
phys
+
1UL
;
/*
/*
* Try to reserve the window mem region. If this fails then
* Try to reserve the window mem region. If this fails then
* it is likely due to a fragment of the window being
* it is likely due to a fragment of the window being
...
@@ -138,7 +138,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
...
@@ -138,7 +138,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
/* Enable writes through the rom window */
/* Enable writes through the rom window */
pci_read_config_byte
(
pdev
,
0x40
,
&
byte
);
pci_read_config_byte
(
pdev
,
0x40
,
&
byte
);
pci_write_config_byte
(
pdev
,
0x40
,
byte
|
1
);
pci_write_config_byte
(
pdev
,
0x40
,
byte
|
1
);
/* FIXME handle registers 0x80 - 0x8C the bios region locks */
/* FIXME handle registers 0x80 - 0x8C the bios region locks */
/* For write accesses caches are useless */
/* For write accesses caches are useless */
...
@@ -186,7 +186,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
...
@@ -186,7 +186,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
MOD_NAME
,
map
->
map
.
phys
);
MOD_NAME
,
map
->
map
.
phys
);
/* There is no generic VPP support */
/* There is no generic VPP support */
for
(
map
->
map
.
bankwidth
=
32
;
map
->
map
.
bankwidth
;
for
(
map
->
map
.
bankwidth
=
32
;
map
->
map
.
bankwidth
;
map
->
map
.
bankwidth
>>=
1
)
map
->
map
.
bankwidth
>>=
1
)
{
{
char
**
probe_type
;
char
**
probe_type
;
...
@@ -239,7 +239,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
...
@@ -239,7 +239,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
for
(
i
=
0
;
i
<
cfi
->
numchips
;
i
++
)
{
for
(
i
=
0
;
i
<
cfi
->
numchips
;
i
++
)
{
cfi
->
chips
[
i
].
start
+=
offset
;
cfi
->
chips
[
i
].
start
+=
offset
;
}
}
/* Now that the mtd devices is complete claim and export it */
/* Now that the mtd devices is complete claim and export it */
map
->
mtd
->
owner
=
THIS_MODULE
;
map
->
mtd
->
owner
=
THIS_MODULE
;
if
(
add_mtd_device
(
map
->
mtd
))
{
if
(
add_mtd_device
(
map
->
mtd
))
{
...
@@ -279,9 +279,9 @@ static void __devexit amd76xrom_remove_one (struct pci_dev *pdev)
...
@@ -279,9 +279,9 @@ static void __devexit amd76xrom_remove_one (struct pci_dev *pdev)
}
}
static
struct
pci_device_id
amd76xrom_pci_tbl
[]
=
{
static
struct
pci_device_id
amd76xrom_pci_tbl
[]
=
{
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7410
,
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7410
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7440
,
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7440
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
{
PCI_VENDOR_ID_AMD
,
0x7468
},
/* amd8111 support */
{
PCI_VENDOR_ID_AMD
,
0x7468
},
/* amd8111 support */
{
0
,
}
{
0
,
}
...
...
drivers/mtd/maps/arctic-mtd.c
View file @
69f34c98
/*
/*
* $Id: arctic-mtd.c,v 1.1
3 2004/11/04 13:24:14
gleixner Exp $
* $Id: arctic-mtd.c,v 1.1
4 2005/11/07 11:14:26
gleixner Exp $
*
*
* drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for
* drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for
* IBM 405LP Arctic boards.
* IBM 405LP Arctic boards.
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
...
drivers/mtd/maps/autcpu12-nvram.c
View file @
69f34c98
/*
/*
* NV-RAM memory access on autcpu12
* NV-RAM memory access on autcpu12
* (C) 2002 Thomas Gleixner (gleixner@autronix.de)
* (C) 2002 Thomas Gleixner (gleixner@autronix.de)
*
*
* $Id: autcpu12-nvram.c,v 1.
8 2004/11/04 13:24:14 gleixner Exp $
* $Id: autcpu12-nvram.c,v 1.
9 2005/11/07 11:14:26 gleixner Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -55,10 +55,10 @@ static int __init init_autcpu12_sram (void)
...
@@ -55,10 +55,10 @@ static int __init init_autcpu12_sram (void)
}
}
simple_map_init
(
&
autcpu_sram_map
);
simple_map_init
(
&
autcpu_sram_map
);
/*
/*
* Check for 32K/128K
* Check for 32K/128K
* read ofs 0
* read ofs 0
* read ofs 0x10000
* read ofs 0x10000
* Write complement to ofs 0x100000
* Write complement to ofs 0x100000
* Read and check result on ofs 0x0
* Read and check result on ofs 0x0
* Restore contents
* Restore contents
...
@@ -66,7 +66,7 @@ static int __init init_autcpu12_sram (void)
...
@@ -66,7 +66,7 @@ static int __init init_autcpu12_sram (void)
save0
=
map_read32
(
&
autcpu12_sram_map
,
0
);
save0
=
map_read32
(
&
autcpu12_sram_map
,
0
);
save1
=
map_read32
(
&
autcpu12_sram_map
,
0x10000
);
save1
=
map_read32
(
&
autcpu12_sram_map
,
0x10000
);
map_write32
(
&
autcpu12_sram_map
,
~
save0
,
0x10000
);
map_write32
(
&
autcpu12_sram_map
,
~
save0
,
0x10000
);
/* if we find this pattern on 0x0, we have 32K size
/* if we find this pattern on 0x0, we have 32K size
* restore contents and exit
* restore contents and exit
*/
*/
if
(
map_read32
(
&
autcpu12_sram_map
,
0
)
!=
save0
)
{
if
(
map_read32
(
&
autcpu12_sram_map
,
0
)
!=
save0
)
{
...
@@ -89,7 +89,7 @@ static int __init init_autcpu12_sram (void)
...
@@ -89,7 +89,7 @@ static int __init init_autcpu12_sram (void)
sram_mtd
->
owner
=
THIS_MODULE
;
sram_mtd
->
owner
=
THIS_MODULE
;
sram_mtd
->
erasesize
=
16
;
sram_mtd
->
erasesize
=
16
;
if
(
add_mtd_device
(
sram_mtd
))
{
if
(
add_mtd_device
(
sram_mtd
))
{
printk
(
"NV-RAM device addition failed
\n
"
);
printk
(
"NV-RAM device addition failed
\n
"
);
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
...
@@ -97,7 +97,7 @@ static int __init init_autcpu12_sram (void)
...
@@ -97,7 +97,7 @@ static int __init init_autcpu12_sram (void)
}
}
printk
(
"NV-RAM device size %ldKiB registered on AUTCPU12
\n
"
,
autcpu12_sram_map
.
size
/
SZ_1K
);
printk
(
"NV-RAM device size %ldKiB registered on AUTCPU12
\n
"
,
autcpu12_sram_map
.
size
/
SZ_1K
);
return
0
;
return
0
;
out_probe:
out_probe:
...
...
drivers/mtd/maps/bast-flash.c
View file @
69f34c98
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* 20-Sep-2004 BJD Initial version
* 20-Sep-2004 BJD Initial version
* 17-Jan-2005 BJD Add whole device if no partitions found
* 17-Jan-2005 BJD Add whole device if no partitions found
*
*
* $Id: bast-flash.c,v 1.
3 2005/10/10 00:13:38 bjd
Exp $
* $Id: bast-flash.c,v 1.
5 2005/11/07 11:14:26 gleixner
Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -75,7 +75,7 @@ static void bast_flash_setrw(int to)
...
@@ -75,7 +75,7 @@ static void bast_flash_setrw(int to)
local_irq_save
(
flags
);
local_irq_save
(
flags
);
val
=
__raw_readb
(
BAST_VA_CTRL3
);
val
=
__raw_readb
(
BAST_VA_CTRL3
);
if
(
to
)
if
(
to
)
val
|=
BAST_CPLD_CTRL3_ROMWEN
;
val
|=
BAST_CPLD_CTRL3_ROMWEN
;
else
else
...
@@ -93,7 +93,7 @@ static int bast_flash_remove(struct device *dev)
...
@@ -93,7 +93,7 @@ static int bast_flash_remove(struct device *dev)
dev_set_drvdata
(
dev
,
NULL
);
dev_set_drvdata
(
dev
,
NULL
);
if
(
info
==
NULL
)
if
(
info
==
NULL
)
return
0
;
return
0
;
if
(
info
->
map
.
virt
!=
NULL
)
if
(
info
->
map
.
virt
!=
NULL
)
...
@@ -111,7 +111,7 @@ static int bast_flash_remove(struct device *dev)
...
@@ -111,7 +111,7 @@ static int bast_flash_remove(struct device *dev)
release_resource
(
info
->
area
);
release_resource
(
info
->
area
);
kfree
(
info
->
area
);
kfree
(
info
->
area
);
}
}
kfree
(
info
);
kfree
(
info
);
return
0
;
return
0
;
...
@@ -138,15 +138,15 @@ static int bast_flash_probe(struct device *dev)
...
@@ -138,15 +138,15 @@ static int bast_flash_probe(struct device *dev)
info
->
map
.
phys
=
res
->
start
;
info
->
map
.
phys
=
res
->
start
;
info
->
map
.
size
=
res
->
end
-
res
->
start
+
1
;
info
->
map
.
size
=
res
->
end
-
res
->
start
+
1
;
info
->
map
.
name
=
dev
->
bus_id
;
info
->
map
.
name
=
dev
->
bus_id
;
info
->
map
.
bankwidth
=
2
;
info
->
map
.
bankwidth
=
2
;
if
(
info
->
map
.
size
>
AREA_MAXSIZE
)
if
(
info
->
map
.
size
>
AREA_MAXSIZE
)
info
->
map
.
size
=
AREA_MAXSIZE
;
info
->
map
.
size
=
AREA_MAXSIZE
;
pr_debug
(
"%s: area %08lx, size %ld
\n
"
,
__FUNCTION__
,
pr_debug
(
"%s: area %08lx, size %ld
\n
"
,
__FUNCTION__
,
info
->
map
.
phys
,
info
->
map
.
size
);
info
->
map
.
phys
,
info
->
map
.
size
);
info
->
area
=
request_mem_region
(
res
->
start
,
info
->
map
.
size
,
info
->
area
=
request_mem_region
(
res
->
start
,
info
->
map
.
size
,
pdev
->
name
);
pdev
->
name
);
if
(
info
->
area
==
NULL
)
{
if
(
info
->
area
==
NULL
)
{
...
@@ -163,7 +163,7 @@ static int bast_flash_probe(struct device *dev)
...
@@ -163,7 +163,7 @@ static int bast_flash_probe(struct device *dev)
err
=
-
EIO
;
err
=
-
EIO
;
goto
exit_error
;
goto
exit_error
;
}
}
simple_map_init
(
&
info
->
map
);
simple_map_init
(
&
info
->
map
);
/* enable the write to the flash area */
/* enable the write to the flash area */
...
@@ -188,7 +188,7 @@ static int bast_flash_probe(struct device *dev)
...
@@ -188,7 +188,7 @@ static int bast_flash_probe(struct device *dev)
err
=
parse_mtd_partitions
(
info
->
mtd
,
probes
,
&
info
->
partitions
,
0
);
err
=
parse_mtd_partitions
(
info
->
mtd
,
probes
,
&
info
->
partitions
,
0
);
if
(
err
>
0
)
{
if
(
err
>
0
)
{
err
=
add_mtd_partitions
(
info
->
mtd
,
info
->
partitions
,
err
);
err
=
add_mtd_partitions
(
info
->
mtd
,
info
->
partitions
,
err
);
if
(
err
)
if
(
err
)
printk
(
KERN_ERR
PFX
"cannot add/parse partitions
\n
"
);
printk
(
KERN_ERR
PFX
"cannot add/parse partitions
\n
"
);
}
else
{
}
else
{
err
=
add_mtd_device
(
info
->
mtd
);
err
=
add_mtd_device
(
info
->
mtd
);
...
...
drivers/mtd/maps/beech-mtd.c
View file @
69f34c98
/*
/*
* $Id: beech-mtd.c,v 1.1
0 2004/11/04 13:24:14
gleixner Exp $
* $Id: beech-mtd.c,v 1.1
1 2005/11/07 11:14:26
gleixner Exp $
*
*
* drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for
* drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for
* IBM 405LP Beech boards.
* IBM 405LP Beech boards.
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
...
drivers/mtd/maps/cdb89712.c
View file @
69f34c98
/*
/*
* Flash on Cirrus CDB89712
* Flash on Cirrus CDB89712
*
*
* $Id: cdb89712.c,v 1.1
0 2004/11/04 13:24:14
gleixner Exp $
* $Id: cdb89712.c,v 1.1
1 2005/11/07 11:14:26
gleixner Exp $
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -37,13 +37,13 @@ struct resource cdb89712_flash_resource = {
...
@@ -37,13 +37,13 @@ struct resource cdb89712_flash_resource = {
static
int
__init
init_cdb89712_flash
(
void
)
static
int
__init
init_cdb89712_flash
(
void
)
{
{
int
err
;
int
err
;
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_flash_resource
))
{
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_flash_resource
))
{
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 FLASH space
\n
"
);
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 FLASH space
\n
"
);
err
=
-
EBUSY
;
err
=
-
EBUSY
;
goto
out
;
goto
out
;
}
}
cdb89712_flash_map
.
virt
=
ioremap
(
FLASH_START
,
FLASH_SIZE
);
cdb89712_flash_map
.
virt
=
ioremap
(
FLASH_START
,
FLASH_SIZE
);
if
(
!
cdb89712_flash_map
.
virt
)
{
if
(
!
cdb89712_flash_map
.
virt
)
{
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 FLASH space
\n
"
);
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 FLASH space
\n
"
);
...
@@ -64,13 +64,13 @@ static int __init init_cdb89712_flash (void)
...
@@ -64,13 +64,13 @@ static int __init init_cdb89712_flash (void)
}
}
flash_mtd
->
owner
=
THIS_MODULE
;
flash_mtd
->
owner
=
THIS_MODULE
;
if
(
add_mtd_device
(
flash_mtd
))
{
if
(
add_mtd_device
(
flash_mtd
))
{
printk
(
"FLASH device addition failed
\n
"
);
printk
(
"FLASH device addition failed
\n
"
);
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
out_probe
;
goto
out_probe
;
}
}
return
0
;
return
0
;
out_probe:
out_probe:
...
@@ -107,13 +107,13 @@ struct resource cdb89712_sram_resource = {
...
@@ -107,13 +107,13 @@ struct resource cdb89712_sram_resource = {
static
int
__init
init_cdb89712_sram
(
void
)
static
int
__init
init_cdb89712_sram
(
void
)
{
{
int
err
;
int
err
;
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_sram_resource
))
{
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_sram_resource
))
{
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 SRAM space
\n
"
);
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 SRAM space
\n
"
);
err
=
-
EBUSY
;
err
=
-
EBUSY
;
goto
out
;
goto
out
;
}
}
cdb89712_sram_map
.
virt
=
ioremap
(
SRAM_START
,
SRAM_SIZE
);
cdb89712_sram_map
.
virt
=
ioremap
(
SRAM_START
,
SRAM_SIZE
);
if
(
!
cdb89712_sram_map
.
virt
)
{
if
(
!
cdb89712_sram_map
.
virt
)
{
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 SRAM space
\n
"
);
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 SRAM space
\n
"
);
...
@@ -130,13 +130,13 @@ static int __init init_cdb89712_sram (void)
...
@@ -130,13 +130,13 @@ static int __init init_cdb89712_sram (void)
sram_mtd
->
owner
=
THIS_MODULE
;
sram_mtd
->
owner
=
THIS_MODULE
;
sram_mtd
->
erasesize
=
16
;
sram_mtd
->
erasesize
=
16
;
if
(
add_mtd_device
(
sram_mtd
))
{
if
(
add_mtd_device
(
sram_mtd
))
{
printk
(
"SRAM device addition failed
\n
"
);
printk
(
"SRAM device addition failed
\n
"
);
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
out_probe
;
goto
out_probe
;
}
}
return
0
;
return
0
;
out_probe:
out_probe:
...
@@ -175,13 +175,13 @@ struct resource cdb89712_bootrom_resource = {
...
@@ -175,13 +175,13 @@ struct resource cdb89712_bootrom_resource = {
static
int
__init
init_cdb89712_bootrom
(
void
)
static
int
__init
init_cdb89712_bootrom
(
void
)
{
{
int
err
;
int
err
;
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_bootrom_resource
))
{
if
(
request_resource
(
&
ioport_resource
,
&
cdb89712_bootrom_resource
))
{
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 BOOTROM space
\n
"
);
printk
(
KERN_NOTICE
"Failed to reserve Cdb89712 BOOTROM space
\n
"
);
err
=
-
EBUSY
;
err
=
-
EBUSY
;
goto
out
;
goto
out
;
}
}
cdb89712_bootrom_map
.
virt
=
ioremap
(
BOOTROM_START
,
BOOTROM_SIZE
);
cdb89712_bootrom_map
.
virt
=
ioremap
(
BOOTROM_START
,
BOOTROM_SIZE
);
if
(
!
cdb89712_bootrom_map
.
virt
)
{
if
(
!
cdb89712_bootrom_map
.
virt
)
{
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 BootROM space
\n
"
);
printk
(
KERN_NOTICE
"Failed to ioremap Cdb89712 BootROM space
\n
"
);
...
@@ -198,13 +198,13 @@ static int __init init_cdb89712_bootrom (void)
...
@@ -198,13 +198,13 @@ static int __init init_cdb89712_bootrom (void)
bootrom_mtd
->
owner
=
THIS_MODULE
;
bootrom_mtd
->
owner
=
THIS_MODULE
;
bootrom_mtd
->
erasesize
=
0x10000
;
bootrom_mtd
->
erasesize
=
0x10000
;
if
(
add_mtd_device
(
bootrom_mtd
))
{
if
(
add_mtd_device
(
bootrom_mtd
))
{
printk
(
"BootROM device addition failed
\n
"
);
printk
(
"BootROM device addition failed
\n
"
);
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
out_probe
;
goto
out_probe
;
}
}
return
0
;
return
0
;
out_probe:
out_probe:
...
@@ -225,16 +225,16 @@ static int __init init_cdb89712_bootrom (void)
...
@@ -225,16 +225,16 @@ static int __init init_cdb89712_bootrom (void)
static
int
__init
init_cdb89712_maps
(
void
)
static
int
__init
init_cdb89712_maps
(
void
)
{
{
printk
(
KERN_INFO
"Cirrus CDB89712 MTD mappings:
\n
Flash 0x%x at 0x%x
\n
SRAM 0x%x at 0x%x
\n
BootROM 0x%x at 0x%x
\n
"
,
printk
(
KERN_INFO
"Cirrus CDB89712 MTD mappings:
\n
Flash 0x%x at 0x%x
\n
SRAM 0x%x at 0x%x
\n
BootROM 0x%x at 0x%x
\n
"
,
FLASH_SIZE
,
FLASH_START
,
SRAM_SIZE
,
SRAM_START
,
BOOTROM_SIZE
,
BOOTROM_START
);
FLASH_SIZE
,
FLASH_START
,
SRAM_SIZE
,
SRAM_START
,
BOOTROM_SIZE
,
BOOTROM_START
);
init_cdb89712_flash
();
init_cdb89712_flash
();
init_cdb89712_sram
();
init_cdb89712_sram
();
init_cdb89712_bootrom
();
init_cdb89712_bootrom
();
return
0
;
return
0
;
}
}
static
void
__exit
cleanup_cdb89712_maps
(
void
)
static
void
__exit
cleanup_cdb89712_maps
(
void
)
{
{
...
@@ -244,7 +244,7 @@ static void __exit cleanup_cdb89712_maps(void)
...
@@ -244,7 +244,7 @@ static void __exit cleanup_cdb89712_maps(void)
iounmap
((
void
*
)
cdb89712_sram_map
.
virt
);
iounmap
((
void
*
)
cdb89712_sram_map
.
virt
);
release_resource
(
&
cdb89712_sram_resource
);
release_resource
(
&
cdb89712_sram_resource
);
}
}
if
(
flash_mtd
)
{
if
(
flash_mtd
)
{
del_mtd_device
(
flash_mtd
);
del_mtd_device
(
flash_mtd
);
map_destroy
(
flash_mtd
);
map_destroy
(
flash_mtd
);
...
...
drivers/mtd/maps/cfi_flagadm.c
View file @
69f34c98
/*
/*
* Copyright 2001 Flaga hf. Medical Devices, Kri Davsson <kd@flaga.is>
* Copyright 2001 Flaga hf. Medical Devices, Kri Davsson <kd@flaga.is>
*
*
* $Id: cfi_flagadm.c,v 1.1
4 2004/11/04 13:24:14
gleixner Exp $
* $Id: cfi_flagadm.c,v 1.1
5 2005/11/07 11:14:26
gleixner Exp $
*
*
* This program is free software; you can redistribute it and/or modify it
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* Free Software Foundation; either version 2 of the License, or (at your
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
*/
*/
#define FLASH_PHYS_ADDR 0x40000000
#define FLASH_PHYS_ADDR 0x40000000
#define FLASH_SIZE 0x400000
#define FLASH_SIZE 0x400000
#define FLASH_PARTITION0_ADDR 0x00000000
#define FLASH_PARTITION0_ADDR 0x00000000
#define FLASH_PARTITION0_SIZE 0x00020000
#define FLASH_PARTITION0_SIZE 0x00020000
...
@@ -79,7 +79,7 @@ struct mtd_partition flagadm_parts[] = {
...
@@ -79,7 +79,7 @@ struct mtd_partition flagadm_parts[] = {
.
offset
=
FLASH_PARTITION2_ADDR
,
.
offset
=
FLASH_PARTITION2_ADDR
,
.
size
=
FLASH_PARTITION2_SIZE
.
size
=
FLASH_PARTITION2_SIZE
},
},
{
{
.
name
=
"Persistant storage"
,
.
name
=
"Persistant storage"
,
.
offset
=
FLASH_PARTITION3_ADDR
,
.
offset
=
FLASH_PARTITION3_ADDR
,
.
size
=
FLASH_PARTITION3_SIZE
.
size
=
FLASH_PARTITION3_SIZE
...
@@ -91,10 +91,10 @@ struct mtd_partition flagadm_parts[] = {
...
@@ -91,10 +91,10 @@ struct mtd_partition flagadm_parts[] = {
static
struct
mtd_info
*
mymtd
;
static
struct
mtd_info
*
mymtd
;
int
__init
init_flagadm
(
void
)
int
__init
init_flagadm
(
void
)
{
{
printk
(
KERN_NOTICE
"FlagaDM flash device: %x at %x
\n
"
,
printk
(
KERN_NOTICE
"FlagaDM flash device: %x at %x
\n
"
,
FLASH_SIZE
,
FLASH_PHYS_ADDR
);
FLASH_SIZE
,
FLASH_PHYS_ADDR
);
flagadm_map
.
phys
=
FLASH_PHYS_ADDR
;
flagadm_map
.
phys
=
FLASH_PHYS_ADDR
;
flagadm_map
.
virt
=
ioremap
(
FLASH_PHYS_ADDR
,
flagadm_map
.
virt
=
ioremap
(
FLASH_PHYS_ADDR
,
FLASH_SIZE
);
FLASH_SIZE
);
...
...
drivers/mtd/maps/cstm_mips_ixx.c
View file @
69f34c98
/*
/*
* $Id: cstm_mips_ixx.c,v 1.1
2 2004/11/04 13:24:14
gleixner Exp $
* $Id: cstm_mips_ixx.c,v 1.1
4 2005/11/07 11:14:26
gleixner Exp $
*
*
* Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
* Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
* Config with both CFI and JEDEC device support.
* Config with both CFI and JEDEC device support.
*
*
* Basically physmap.c with the addition of partitions and
* Basically physmap.c with the addition of partitions and
* an array of mapping info to accomodate more than one flash type per board.
* an array of mapping info to accomodate more than one flash type per board.
*
*
* Copyright 2000 MontaVista Software Inc.
* Copyright 2000 MontaVista Software Inc.
...
@@ -69,7 +69,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
...
@@ -69,7 +69,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
__u16
data
;
__u16
data
;
__u8
data1
;
__u8
data1
;
static
u8
first
=
1
;
static
u8
first
=
1
;
// Set GPIO port B pin3 to high
// Set GPIO port B pin3 to high
data
=
*
(
__u16
*
)(
CC_GPBCR
);
data
=
*
(
__u16
*
)(
CC_GPBCR
);
data
=
(
data
&
0xff0f
)
|
0x0040
;
data
=
(
data
&
0xff0f
)
|
0x0040
;
...
@@ -85,7 +85,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
...
@@ -85,7 +85,7 @@ void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
}
else
{
}
else
{
if
(
!--
vpp_count
)
{
if
(
!--
vpp_count
)
{
__u16
data
;
__u16
data
;
// Set GPIO port B pin3 to high
// Set GPIO port B pin3 to high
data
=
*
(
__u16
*
)(
CC_GPBCR
);
data
=
*
(
__u16
*
)(
CC_GPBCR
);
data
=
(
data
&
0xff3f
)
|
0x0040
;
data
=
(
data
&
0xff3f
)
|
0x0040
;
...
@@ -109,8 +109,8 @@ struct cstm_mips_ixx_info {
...
@@ -109,8 +109,8 @@ struct cstm_mips_ixx_info {
};
};
#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
#define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type
#define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type
const
struct
cstm_mips_ixx_info
cstm_mips_ixx_board_desc
[
PHYSMAP_NUMBER
]
=
const
struct
cstm_mips_ixx_info
cstm_mips_ixx_board_desc
[
PHYSMAP_NUMBER
]
=
{
{
{
// 28F128J3A in 2x16 configuration
{
// 28F128J3A in 2x16 configuration
"big flash"
,
// name
"big flash"
,
// name
...
@@ -131,10 +131,10 @@ static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP
...
@@ -131,10 +131,10 @@ static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP
},
},
};
};
#else
/* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
#else
/* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
#define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type
#define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type
const
struct
cstm_mips_ixx_info
cstm_mips_ixx_board_desc
[
PHYSMAP_NUMBER
]
=
const
struct
cstm_mips_ixx_info
cstm_mips_ixx_board_desc
[
PHYSMAP_NUMBER
]
=
{
{
{
{
"MTD flash"
,
// name
"MTD flash"
,
// name
CONFIG_MTD_CSTM_MIPS_IXX_START
,
// window_addr
CONFIG_MTD_CSTM_MIPS_IXX_START
,
// window_addr
CONFIG_MTD_CSTM_MIPS_IXX_LEN
,
// window_size
CONFIG_MTD_CSTM_MIPS_IXX_LEN
,
// window_size
...
@@ -144,7 +144,7 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
...
@@ -144,7 +144,7 @@ const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
};
};
static
struct
mtd_partition
cstm_mips_ixx_partitions
[
PHYSMAP_NUMBER
][
MAX_PHYSMAP_PARTITIONS
]
=
{
static
struct
mtd_partition
cstm_mips_ixx_partitions
[
PHYSMAP_NUMBER
][
MAX_PHYSMAP_PARTITIONS
]
=
{
{
{
{
{
.
name
=
"main partition"
,
.
name
=
"main partition"
,
.
size
=
CONFIG_MTD_CSTM_MIPS_IXX_LEN
,
.
size
=
CONFIG_MTD_CSTM_MIPS_IXX_LEN
,
...
@@ -165,7 +165,7 @@ int __init init_cstm_mips_ixx(void)
...
@@ -165,7 +165,7 @@ int __init init_cstm_mips_ixx(void)
/* Initialize mapping */
/* Initialize mapping */
for
(
i
=
0
;
i
<
PHYSMAP_NUMBER
;
i
++
)
{
for
(
i
=
0
;
i
<
PHYSMAP_NUMBER
;
i
++
)
{
printk
(
KERN_NOTICE
"cstm_mips_ixx flash device: 0x%lx at 0x%lx
\n
"
,
printk
(
KERN_NOTICE
"cstm_mips_ixx flash device: 0x%lx at 0x%lx
\n
"
,
cstm_mips_ixx_board_desc
[
i
].
window_size
,
cstm_mips_ixx_board_desc
[
i
].
window_addr
);
cstm_mips_ixx_board_desc
[
i
].
window_size
,
cstm_mips_ixx_board_desc
[
i
].
window_addr
);
...
@@ -235,7 +235,7 @@ void PCISetULongByOffset(__u32 DevNumber, __u32 FuncNumber, __u32 Offset, __u32
...
@@ -235,7 +235,7 @@ void PCISetULongByOffset(__u32 DevNumber, __u32 FuncNumber, __u32 Offset, __u32
offset
=
(
unsigned
long
)(
0x80000000
|
(
DevNumber
<<
11
)
+
(
FuncNumber
<<
8
)
+
Offset
)
;
offset
=
(
unsigned
long
)(
0x80000000
|
(
DevNumber
<<
11
)
+
(
FuncNumber
<<
8
)
+
Offset
)
;
*
(
__u32
*
)
CC_CONFADDR
=
offset
;
*
(
__u32
*
)
CC_CONFADDR
=
offset
;
*
(
__u32
*
)
CC_CONFDATA
=
data
;
*
(
__u32
*
)
CC_CONFDATA
=
data
;
}
}
void
setup_ITE_IVR_flash
()
void
setup_ITE_IVR_flash
()
...
...
drivers/mtd/maps/dbox2-flash.c
View file @
69f34c98
/*
/*
* $Id: dbox2-flash.c,v 1.1
3 2004/11/04 13:24:14
gleixner Exp $
* $Id: dbox2-flash.c,v 1.1
4 2005/11/07 11:14:26
gleixner Exp $
*
*
* D-Box 2 flash driver
* D-Box 2 flash driver
*/
*/
...
@@ -21,38 +21,38 @@
...
@@ -21,38 +21,38 @@
static
struct
mtd_partition
partition_info
[]
=
{
static
struct
mtd_partition
partition_info
[]
=
{
{
{
.
name
=
"BR bootloader"
,
.
name
=
"BR bootloader"
,
.
size
=
128
*
1024
,
.
size
=
128
*
1024
,
.
offset
=
0
,
.
offset
=
0
,
.
mask_flags
=
MTD_WRITEABLE
.
mask_flags
=
MTD_WRITEABLE
},
},
{
{
.
name
=
"FLFS (U-Boot)"
,
.
name
=
"FLFS (U-Boot)"
,
.
size
=
128
*
1024
,
.
size
=
128
*
1024
,
.
offset
=
MTDPART_OFS_APPEND
,
.
offset
=
MTDPART_OFS_APPEND
,
.
mask_flags
=
0
.
mask_flags
=
0
},
},
{
{
.
name
=
"Root (SquashFS)"
,
.
name
=
"Root (SquashFS)"
,
.
size
=
7040
*
1024
,
.
size
=
7040
*
1024
,
.
offset
=
MTDPART_OFS_APPEND
,
.
offset
=
MTDPART_OFS_APPEND
,
.
mask_flags
=
0
.
mask_flags
=
0
},
},
{
{
.
name
=
"var (JFFS2)"
,
.
name
=
"var (JFFS2)"
,
.
size
=
896
*
1024
,
.
size
=
896
*
1024
,
.
offset
=
MTDPART_OFS_APPEND
,
.
offset
=
MTDPART_OFS_APPEND
,
.
mask_flags
=
0
.
mask_flags
=
0
},
},
{
{
.
name
=
"Flash without bootloader"
,
.
name
=
"Flash without bootloader"
,
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
128
*
1024
,
.
offset
=
128
*
1024
,
.
mask_flags
=
0
.
mask_flags
=
0
},
},
{
{
.
name
=
"Complete Flash"
,
.
name
=
"Complete Flash"
,
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
0
,
.
offset
=
0
,
.
mask_flags
=
MTD_WRITEABLE
.
mask_flags
=
MTD_WRITEABLE
}
}
};
};
...
@@ -88,16 +88,16 @@ int __init init_dbox2_flash(void)
...
@@ -88,16 +88,16 @@ int __init init_dbox2_flash(void)
if
(
!
mymtd
)
{
if
(
!
mymtd
)
{
// Probe for single Intel 28F640
// Probe for single Intel 28F640
dbox2_flash_map
.
bankwidth
=
2
;
dbox2_flash_map
.
bankwidth
=
2
;
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
dbox2_flash_map
);
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
dbox2_flash_map
);
}
}
if
(
mymtd
)
{
if
(
mymtd
)
{
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
/* Create MTD devices for each partition. */
/* Create MTD devices for each partition. */
add_mtd_partitions
(
mymtd
,
partition_info
,
NUM_PARTITIONS
);
add_mtd_partitions
(
mymtd
,
partition_info
,
NUM_PARTITIONS
);
return
0
;
return
0
;
}
}
...
...
drivers/mtd/maps/dc21285.c
View file @
69f34c98
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
* (C) 2000 Nicolas Pitre <nico@cam.org>
* (C) 2000 Nicolas Pitre <nico@cam.org>
*
*
* This code is GPL
* This code is GPL
*
*
* $Id: dc21285.c,v 1.2
2 2004/11/01 13:39:21 rmk
Exp $
* $Id: dc21285.c,v 1.2
4 2005/11/07 11:14:26 gleixner
Exp $
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
static
struct
mtd_info
*
dc21285_mtd
;
static
struct
mtd_info
*
dc21285_mtd
;
#ifdef CONFIG_ARCH_NETWINDER
#ifdef CONFIG_ARCH_NETWINDER
/*
/*
* This is really ugly, but it seams to be the only
* This is really ugly, but it seams to be the only
* realiable way to do it, as the cpld state machine
* realiable way to do it, as the cpld state machine
* is unpredictible. So we have a 25us penalty per
* is unpredictible. So we have a 25us penalty per
* write access.
* write access.
*/
*/
...
@@ -150,7 +150,7 @@ static struct map_info dc21285_map = {
...
@@ -150,7 +150,7 @@ static struct map_info dc21285_map = {
static
struct
mtd_partition
*
dc21285_parts
;
static
struct
mtd_partition
*
dc21285_parts
;
static
const
char
*
probes
[]
=
{
"RedBoot"
,
"cmdlinepart"
,
NULL
};
static
const
char
*
probes
[]
=
{
"RedBoot"
,
"cmdlinepart"
,
NULL
};
#endif
#endif
static
int
__init
init_dc21285
(
void
)
static
int
__init
init_dc21285
(
void
)
{
{
...
@@ -160,20 +160,20 @@ static int __init init_dc21285(void)
...
@@ -160,20 +160,20 @@ static int __init init_dc21285(void)
/* Determine bankwidth */
/* Determine bankwidth */
switch
(
*
CSR_SA110_CNTL
&
(
3
<<
14
))
{
switch
(
*
CSR_SA110_CNTL
&
(
3
<<
14
))
{
case
SA110_CNTL_ROMWIDTH_8
:
case
SA110_CNTL_ROMWIDTH_8
:
dc21285_map
.
bankwidth
=
1
;
dc21285_map
.
bankwidth
=
1
;
dc21285_map
.
read
=
dc21285_read8
;
dc21285_map
.
read
=
dc21285_read8
;
dc21285_map
.
write
=
dc21285_write8
;
dc21285_map
.
write
=
dc21285_write8
;
dc21285_map
.
copy_to
=
dc21285_copy_to_8
;
dc21285_map
.
copy_to
=
dc21285_copy_to_8
;
break
;
break
;
case
SA110_CNTL_ROMWIDTH_16
:
case
SA110_CNTL_ROMWIDTH_16
:
dc21285_map
.
bankwidth
=
2
;
dc21285_map
.
bankwidth
=
2
;
dc21285_map
.
read
=
dc21285_read16
;
dc21285_map
.
read
=
dc21285_read16
;
dc21285_map
.
write
=
dc21285_write16
;
dc21285_map
.
write
=
dc21285_write16
;
dc21285_map
.
copy_to
=
dc21285_copy_to_16
;
dc21285_map
.
copy_to
=
dc21285_copy_to_16
;
break
;
break
;
case
SA110_CNTL_ROMWIDTH_32
:
case
SA110_CNTL_ROMWIDTH_32
:
dc21285_map
.
bankwidth
=
4
;
dc21285_map
.
bankwidth
=
4
;
dc21285_map
.
read
=
dc21285_read32
;
dc21285_map
.
read
=
dc21285_read32
;
dc21285_map
.
write
=
dc21285_write32
;
dc21285_map
.
write
=
dc21285_write32
;
dc21285_map
.
copy_to
=
dc21285_copy_to_32
;
dc21285_map
.
copy_to
=
dc21285_copy_to_32
;
...
@@ -201,20 +201,20 @@ static int __init init_dc21285(void)
...
@@ -201,20 +201,20 @@ static int __init init_dc21285(void)
if
(
!
dc21285_mtd
)
{
if
(
!
dc21285_mtd
)
{
iounmap
(
dc21285_map
.
virt
);
iounmap
(
dc21285_map
.
virt
);
return
-
ENXIO
;
return
-
ENXIO
;
}
}
dc21285_mtd
->
owner
=
THIS_MODULE
;
dc21285_mtd
->
owner
=
THIS_MODULE
;
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
nrparts
=
parse_mtd_partitions
(
dc21285_mtd
,
probes
,
&
dc21285_parts
,
0
);
nrparts
=
parse_mtd_partitions
(
dc21285_mtd
,
probes
,
&
dc21285_parts
,
0
);
if
(
nrparts
>
0
)
if
(
nrparts
>
0
)
add_mtd_partitions
(
dc21285_mtd
,
dc21285_parts
,
nrparts
);
add_mtd_partitions
(
dc21285_mtd
,
dc21285_parts
,
nrparts
);
else
else
#endif
#endif
add_mtd_device
(
dc21285_mtd
);
add_mtd_device
(
dc21285_mtd
);
if
(
machine_is_ebsa285
())
{
if
(
machine_is_ebsa285
())
{
/*
/*
* Flash timing is determined with bits 19-16 of the
* Flash timing is determined with bits 19-16 of the
* CSR_SA110_CNTL. The value is the number of wait cycles, or
* CSR_SA110_CNTL. The value is the number of wait cycles, or
* 0 for 16 cycles (the default). Cycles are 20 ns.
* 0 for 16 cycles (the default). Cycles are 20 ns.
...
@@ -227,7 +227,7 @@ static int __init init_dc21285(void)
...
@@ -227,7 +227,7 @@ static int __init init_dc21285(void)
/* tristate time */
/* tristate time */
*
CSR_SA110_CNTL
=
((
*
CSR_SA110_CNTL
&
~
0x0f000000
)
|
(
7
<<
24
));
*
CSR_SA110_CNTL
=
((
*
CSR_SA110_CNTL
&
~
0x0f000000
)
|
(
7
<<
24
));
}
}
return
0
;
return
0
;
}
}
...
...
drivers/mtd/maps/dilnetpc.c
View file @
69f34c98
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
* along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
*
* $Id: dilnetpc.c,v 1.
17 2004/11/28 09:40:39 dwmw2
Exp $
* $Id: dilnetpc.c,v 1.
20 2005/11/07 11:14:26 gleixner
Exp $
*
*
* The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
* The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
* featuring the AMD Elan SC410 processor. There are two variants of this
* featuring the AMD Elan SC410 processor. There are two variants of this
...
@@ -272,13 +272,13 @@ static struct map_info dnpc_map = {
...
@@ -272,13 +272,13 @@ static struct map_info dnpc_map = {
static
struct
mtd_partition
partition_info
[]
=
static
struct
mtd_partition
partition_info
[]
=
{
{
{
{
.
name
=
"ADNP boot"
,
.
name
=
"ADNP boot"
,
.
offset
=
0
,
.
offset
=
0
,
.
size
=
0xf0000
,
.
size
=
0xf0000
,
},
},
{
{
.
name
=
"ADNP system BIOS"
,
.
name
=
"ADNP system BIOS"
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
size
=
0x10000
,
.
size
=
0x10000
,
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
...
@@ -291,7 +291,7 @@ static struct mtd_partition partition_info[]=
...
@@ -291,7 +291,7 @@ static struct mtd_partition partition_info[]=
.
size
=
0x2f0000
,
.
size
=
0x2f0000
,
},
},
{
{
.
name
=
"ADNP system BIOS entry"
,
.
name
=
"ADNP system BIOS entry"
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
...
@@ -325,9 +325,9 @@ static struct mtd_info *merged_mtd;
...
@@ -325,9 +325,9 @@ static struct mtd_info *merged_mtd;
static
struct
mtd_partition
higlvl_partition_info
[]
=
static
struct
mtd_partition
higlvl_partition_info
[]
=
{
{
{
{
.
name
=
"ADNP boot block"
,
.
name
=
"ADNP boot block"
,
.
offset
=
0
,
.
offset
=
0
,
.
size
=
CONFIG_MTD_DILNETPC_BOOTSIZE
,
.
size
=
CONFIG_MTD_DILNETPC_BOOTSIZE
,
},
},
{
{
...
@@ -335,8 +335,8 @@ static struct mtd_partition higlvl_partition_info[]=
...
@@ -335,8 +335,8 @@ static struct mtd_partition higlvl_partition_info[]=
.
offset
=
MTDPART_OFS_NXTBLK
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
size
=
ADNP_WINDOW_SIZE
-
CONFIG_MTD_DILNETPC_BOOTSIZE
-
0x20000
,
.
size
=
ADNP_WINDOW_SIZE
-
CONFIG_MTD_DILNETPC_BOOTSIZE
-
0x20000
,
},
},
{
{
.
name
=
"ADNP system BIOS + BIOS Entry"
,
.
name
=
"ADNP system BIOS + BIOS Entry"
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
offset
=
MTDPART_OFS_NXTBLK
,
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
#ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
...
@@ -371,7 +371,7 @@ static int __init init_dnpc(void)
...
@@ -371,7 +371,7 @@ static int __init init_dnpc(void)
/*
/*
** determine hardware (DNP/ADNP/invalid)
** determine hardware (DNP/ADNP/invalid)
*/
*/
if
((
is_dnp
=
dnp_adnp_probe
())
<
0
)
if
((
is_dnp
=
dnp_adnp_probe
())
<
0
)
return
-
ENXIO
;
return
-
ENXIO
;
...
@@ -397,13 +397,13 @@ static int __init init_dnpc(void)
...
@@ -397,13 +397,13 @@ static int __init init_dnpc(void)
++
dnpc_map
.
name
;
++
dnpc_map
.
name
;
for
(
i
=
0
;
i
<
NUM_PARTITIONS
;
i
++
)
for
(
i
=
0
;
i
<
NUM_PARTITIONS
;
i
++
)
++
partition_info
[
i
].
name
;
++
partition_info
[
i
].
name
;
higlvl_partition_info
[
1
].
size
=
DNP_WINDOW_SIZE
-
higlvl_partition_info
[
1
].
size
=
DNP_WINDOW_SIZE
-
CONFIG_MTD_DILNETPC_BOOTSIZE
-
0x20000
;
CONFIG_MTD_DILNETPC_BOOTSIZE
-
0x20000
;
for
(
i
=
0
;
i
<
NUM_HIGHLVL_PARTITIONS
;
i
++
)
for
(
i
=
0
;
i
<
NUM_HIGHLVL_PARTITIONS
;
i
++
)
++
higlvl_partition_info
[
i
].
name
;
++
higlvl_partition_info
[
i
].
name
;
}
}
printk
(
KERN_NOTICE
"DIL/Net %s flash: 0x%lx at 0x%lx
\n
"
,
printk
(
KERN_NOTICE
"DIL/Net %s flash: 0x%lx at 0x%lx
\n
"
,
is_dnp
?
"DNPC"
:
"ADNP"
,
dnpc_map
.
size
,
dnpc_map
.
phys
);
is_dnp
?
"DNPC"
:
"ADNP"
,
dnpc_map
.
size
,
dnpc_map
.
phys
);
dnpc_map
.
virt
=
ioremap_nocache
(
dnpc_map
.
phys
,
dnpc_map
.
size
);
dnpc_map
.
virt
=
ioremap_nocache
(
dnpc_map
.
phys
,
dnpc_map
.
size
);
...
@@ -436,7 +436,7 @@ static int __init init_dnpc(void)
...
@@ -436,7 +436,7 @@ static int __init init_dnpc(void)
iounmap
(
dnpc_map
.
virt
);
iounmap
(
dnpc_map
.
virt
);
return
-
ENXIO
;
return
-
ENXIO
;
}
}
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
/*
/*
...
...
drivers/mtd/maps/dmv182.c
View file @
69f34c98
/*
/*
* drivers/mtd/maps/svme182.c
* drivers/mtd/maps/svme182.c
*
*
* Flash map driver for the Dy4 SVME182 board
* Flash map driver for the Dy4 SVME182 board
*
*
* $Id: dmv182.c,v 1.
5 2004/11/04 13:24:14
gleixner Exp $
* $Id: dmv182.c,v 1.
6 2005/11/07 11:14:26
gleixner Exp $
*
*
* Copyright 2003-2004, TimeSys Corporation
* Copyright 2003-2004, TimeSys Corporation
*
*
...
@@ -104,7 +104,7 @@ static int __init init_svme182(void)
...
@@ -104,7 +104,7 @@ static int __init init_svme182(void)
partitions
=
svme182_partitions
;
partitions
=
svme182_partitions
;
svme182_map
.
virt
=
ioremap
(
FLASH_BASE_ADDR
,
svme182_map
.
size
);
svme182_map
.
virt
=
ioremap
(
FLASH_BASE_ADDR
,
svme182_map
.
size
);
if
(
svme182_map
.
virt
==
0
)
{
if
(
svme182_map
.
virt
==
0
)
{
printk
(
"Failed to ioremap FLASH memory area.
\n
"
);
printk
(
"Failed to ioremap FLASH memory area.
\n
"
);
return
-
EIO
;
return
-
EIO
;
...
...
drivers/mtd/maps/ebony.c
View file @
69f34c98
/*
/*
* $Id: ebony.c,v 1.1
5 2004/12/09 18:39:54 holindho
Exp $
* $Id: ebony.c,v 1.1
6 2005/11/07 11:14:26 gleixner
Exp $
*
*
* Mapping for Ebony user flash
* Mapping for Ebony user flash
*
*
* Matt Porter <mporter@kernel.crashing.org>
* Matt Porter <mporter@kernel.crashing.org>
...
@@ -85,7 +85,7 @@ int __init init_ebony(void)
...
@@ -85,7 +85,7 @@ int __init init_ebony(void)
small_flash_base
=
EBONY_SMALL_FLASH_LOW2
;
small_flash_base
=
EBONY_SMALL_FLASH_LOW2
;
else
else
small_flash_base
=
EBONY_SMALL_FLASH_LOW1
;
small_flash_base
=
EBONY_SMALL_FLASH_LOW1
;
if
(
EBONY_BOOT_SMALL_FLASH
(
fpga0_reg
)
&&
if
(
EBONY_BOOT_SMALL_FLASH
(
fpga0_reg
)
&&
!
EBONY_ONBRD_FLASH_EN
(
fpga0_reg
))
!
EBONY_ONBRD_FLASH_EN
(
fpga0_reg
))
large_flash_base
=
EBONY_LARGE_FLASH_LOW
;
large_flash_base
=
EBONY_LARGE_FLASH_LOW
;
...
...
drivers/mtd/maps/edb7312.c
View file @
69f34c98
/*
/*
* $Id: edb7312.c,v 1.1
3 2004/11/04 13:24:14
gleixner Exp $
* $Id: edb7312.c,v 1.1
4 2005/11/07 11:14:27
gleixner Exp $
*
*
* Handle mapping of the NOR flash on Cogent EDB7312 boards
* Handle mapping of the NOR flash on Cogent EDB7312 boards
*
*
* Copyright 2002 SYSGO Real-Time Solutions GmbH
* Copyright 2002 SYSGO Real-Time Solutions GmbH
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
@@ -46,7 +46,7 @@ struct map_info edb7312nor_map = {
...
@@ -46,7 +46,7 @@ struct map_info edb7312nor_map = {
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
/*
/*
* MTD partitioning stuff
* MTD partitioning stuff
*/
*/
static
struct
mtd_partition
static_partitions
[
3
]
=
static
struct
mtd_partition
static_partitions
[
3
]
=
{
{
...
@@ -80,7 +80,7 @@ int __init init_edb7312nor(void)
...
@@ -80,7 +80,7 @@ int __init init_edb7312nor(void)
const
char
**
type
;
const
char
**
type
;
const
char
*
part_type
=
0
;
const
char
*
part_type
=
0
;
printk
(
KERN_NOTICE
MSG_PREFIX
"0x%08x at 0x%08x
\n
"
,
printk
(
KERN_NOTICE
MSG_PREFIX
"0x%08x at 0x%08x
\n
"
,
WINDOW_SIZE
,
WINDOW_ADDR
);
WINDOW_SIZE
,
WINDOW_ADDR
);
edb7312nor_map
.
virt
=
ioremap
(
WINDOW_ADDR
,
WINDOW_SIZE
);
edb7312nor_map
.
virt
=
ioremap
(
WINDOW_ADDR
,
WINDOW_SIZE
);
...
@@ -88,7 +88,7 @@ int __init init_edb7312nor(void)
...
@@ -88,7 +88,7 @@ int __init init_edb7312nor(void)
printk
(
MSG_PREFIX
"failed to ioremap
\n
"
);
printk
(
MSG_PREFIX
"failed to ioremap
\n
"
);
return
-
EIO
;
return
-
EIO
;
}
}
simple_map_init
(
&
edb7312nor_map
);
simple_map_init
(
&
edb7312nor_map
);
mymtd
=
0
;
mymtd
=
0
;
...
...
drivers/mtd/maps/epxa10db-flash.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* Copyright (C) 2001 Altera Corporation
* Copyright (C) 2001 Altera Corporation
* Copyright (C) 2001 Red Hat, Inc.
* Copyright (C) 2001 Red Hat, Inc.
*
*
* $Id: epxa10db-flash.c,v 1.1
3 2004/11/04 13:24:14 gleixner Exp $
* $Id: epxa10db-flash.c,v 1.1
5 2005/11/07 11:14:27 gleixner Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -62,7 +62,7 @@ static const char *probes[] = { "RedBoot", "afs", NULL };
...
@@ -62,7 +62,7 @@ static const char *probes[] = { "RedBoot", "afs", NULL };
static
int
__init
epxa_mtd_init
(
void
)
static
int
__init
epxa_mtd_init
(
void
)
{
{
int
i
;
int
i
;
printk
(
KERN_NOTICE
"%s flash device: 0x%x at 0x%x
\n
"
,
BOARD_NAME
,
FLASH_SIZE
,
FLASH_START
);
printk
(
KERN_NOTICE
"%s flash device: 0x%x at 0x%x
\n
"
,
BOARD_NAME
,
FLASH_SIZE
,
FLASH_START
);
epxa_map
.
virt
=
ioremap
(
FLASH_START
,
FLASH_SIZE
);
epxa_map
.
virt
=
ioremap
(
FLASH_START
,
FLASH_SIZE
);
...
@@ -126,8 +126,8 @@ static void __exit epxa_mtd_cleanup(void)
...
@@ -126,8 +126,8 @@ static void __exit epxa_mtd_cleanup(void)
}
}
/*
/*
* This will do for now, once we decide which bootldr we're finally
* This will do for now, once we decide which bootldr we're finally
* going to use then we'll remove this function and do it properly
* going to use then we'll remove this function and do it properly
*
*
* Partions are currently (as offsets from base of flash):
* Partions are currently (as offsets from base of flash):
...
@@ -140,7 +140,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa
...
@@ -140,7 +140,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa
struct
mtd_partition
*
parts
;
struct
mtd_partition
*
parts
;
int
ret
,
i
;
int
ret
,
i
;
int
npartitions
=
0
;
int
npartitions
=
0
;
char
*
names
;
char
*
names
;
const
char
*
name
=
"jffs"
;
const
char
*
name
=
"jffs"
;
printk
(
"Using default partitions for %s
\n
"
,
BOARD_NAME
);
printk
(
"Using default partitions for %s
\n
"
,
BOARD_NAME
);
...
@@ -152,7 +152,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa
...
@@ -152,7 +152,7 @@ static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_pa
goto
out
;
goto
out
;
}
}
i
=
0
;
i
=
0
;
names
=
(
char
*
)
&
parts
[
npartitions
];
names
=
(
char
*
)
&
parts
[
npartitions
];
parts
[
i
].
name
=
names
;
parts
[
i
].
name
=
names
;
names
+=
strlen
(
name
)
+
1
;
names
+=
strlen
(
name
)
+
1
;
strcpy
(
parts
[
i
].
name
,
name
);
strcpy
(
parts
[
i
].
name
,
name
);
...
...
drivers/mtd/maps/fortunet.c
View file @
69f34c98
/* fortunet.c memory map
/* fortunet.c memory map
*
*
* $Id: fortunet.c,v 1.
9 2004/11/04 13:24:14
gleixner Exp $
* $Id: fortunet.c,v 1.
11 2005/11/07 11:14:27
gleixner Exp $
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -212,7 +212,7 @@ int __init init_fortunet(void)
...
@@ -212,7 +212,7 @@ int __init init_fortunet(void)
map_regions
[
ix
].
map_info
.
phys
=
map_regions
[
ix
].
window_addr_physical
,
map_regions
[
ix
].
map_info
.
phys
=
map_regions
[
ix
].
window_addr_physical
,
map_regions
[
ix
].
map_info
.
virt
=
map_regions
[
ix
].
map_info
.
virt
=
ioremap_nocache
(
ioremap_nocache
(
map_regions
[
ix
].
window_addr_physical
,
map_regions
[
ix
].
window_addr_physical
,
map_regions
[
ix
].
map_info
.
size
);
map_regions
[
ix
].
map_info
.
size
);
...
...
drivers/mtd/maps/h720x-flash.c
View file @
69f34c98
/*
/*
* Flash memory access on Hynix GMS30C7201/HMS30C7202 based
* Flash memory access on Hynix GMS30C7201/HMS30C7202 based
* evaluation boards
* evaluation boards
*
*
* $Id: h720x-flash.c,v 1.1
1 2004/11/04 13:24:14
gleixner Exp $
* $Id: h720x-flash.c,v 1.1
2 2005/11/07 11:14:27
gleixner Exp $
*
*
* (C) 2002 Jungjun Kim <jungjun.kim@hynix.com>
* (C) 2002 Jungjun Kim <jungjun.kim@hynix.com>
* 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Thomas Gleixner <tglx@linutronix.de>
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -72,7 +72,7 @@ int __init h720x_mtd_init(void)
...
@@ -72,7 +72,7 @@ int __init h720x_mtd_init(void)
{
{
char
*
part_type
=
NULL
;
char
*
part_type
=
NULL
;
h720x_map
.
virt
=
ioremap
(
FLASH_PHYS
,
FLASH_SIZE
);
h720x_map
.
virt
=
ioremap
(
FLASH_PHYS
,
FLASH_SIZE
);
if
(
!
h720x_map
.
virt
)
{
if
(
!
h720x_map
.
virt
)
{
...
@@ -91,7 +91,7 @@ int __init h720x_mtd_init(void)
...
@@ -91,7 +91,7 @@ int __init h720x_mtd_init(void)
h720x_map
.
bankwidth
=
2
;
h720x_map
.
bankwidth
=
2
;
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
h720x_map
);
mymtd
=
do_map_probe
(
"cfi_probe"
,
&
h720x_map
);
}
}
if
(
mymtd
)
{
if
(
mymtd
)
{
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
...
@@ -124,11 +124,11 @@ static void __exit h720x_mtd_cleanup(void)
...
@@ -124,11 +124,11 @@ static void __exit h720x_mtd_cleanup(void)
del_mtd_partitions
(
mymtd
);
del_mtd_partitions
(
mymtd
);
map_destroy
(
mymtd
);
map_destroy
(
mymtd
);
}
}
/* Free partition info, if commandline partition was used */
/* Free partition info, if commandline partition was used */
if
(
mtd_parts
&&
(
mtd_parts
!=
h720x_partitions
))
if
(
mtd_parts
&&
(
mtd_parts
!=
h720x_partitions
))
kfree
(
mtd_parts
);
kfree
(
mtd_parts
);
if
(
h720x_map
.
virt
)
{
if
(
h720x_map
.
virt
)
{
iounmap
((
void
*
)
h720x_map
.
virt
);
iounmap
((
void
*
)
h720x_map
.
virt
);
h720x_map
.
virt
=
0
;
h720x_map
.
virt
=
0
;
...
...
drivers/mtd/maps/ichxrom.c
View file @
69f34c98
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ichxrom.c
* ichxrom.c
*
*
* Normal mappings of chips in physical memory
* Normal mappings of chips in physical memory
* $Id: ichxrom.c,v 1.1
8 2005/07/07 10:26:20 dwmw2
Exp $
* $Id: ichxrom.c,v 1.1
9 2005/11/07 11:14:27 gleixner
Exp $
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -101,7 +101,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
...
@@ -101,7 +101,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
* you can only really attach a FWH to an ICHX there
* you can only really attach a FWH to an ICHX there
* a number of simplifications you can make.
* a number of simplifications you can make.
*
*
* Also you can page firmware hubs if an 8MB window isn't enough
* Also you can page firmware hubs if an 8MB window isn't enough
* but don't currently handle that case either.
* but don't currently handle that case either.
*/
*/
window
->
pdev
=
pdev
;
window
->
pdev
=
pdev
;
...
@@ -144,7 +144,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
...
@@ -144,7 +144,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
window
->
phys
=
0xfff00000
;
window
->
phys
=
0xfff00000
;
}
}
else
if
((
byte
&
0x80
)
==
0x80
)
{
else
if
((
byte
&
0x80
)
==
0x80
)
{
window
->
phys
=
0xfff80000
;
window
->
phys
=
0xfff80000
;
}
}
if
(
window
->
phys
==
0
)
{
if
(
window
->
phys
==
0
)
{
...
@@ -233,7 +233,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
...
@@ -233,7 +233,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
* in a factory setting. So in-place programming
* in a factory setting. So in-place programming
* needs to use a different method.
* needs to use a different method.
*/
*/
for
(
map
->
map
.
bankwidth
=
32
;
map
->
map
.
bankwidth
;
for
(
map
->
map
.
bankwidth
=
32
;
map
->
map
.
bankwidth
;
map
->
map
.
bankwidth
>>=
1
)
map
->
map
.
bankwidth
>>=
1
)
{
{
char
**
probe_type
;
char
**
probe_type
;
...
@@ -286,7 +286,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
...
@@ -286,7 +286,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
for
(
i
=
0
;
i
<
cfi
->
numchips
;
i
++
)
{
for
(
i
=
0
;
i
<
cfi
->
numchips
;
i
++
)
{
cfi
->
chips
[
i
].
start
+=
offset
;
cfi
->
chips
[
i
].
start
+=
offset
;
}
}
/* Now that the mtd devices is complete claim and export it */
/* Now that the mtd devices is complete claim and export it */
map
->
mtd
->
owner
=
THIS_MODULE
;
map
->
mtd
->
owner
=
THIS_MODULE
;
if
(
add_mtd_device
(
map
->
mtd
))
{
if
(
add_mtd_device
(
map
->
mtd
))
{
...
@@ -325,11 +325,11 @@ static void __devexit ichxrom_remove_one (struct pci_dev *pdev)
...
@@ -325,11 +325,11 @@ static void __devexit ichxrom_remove_one (struct pci_dev *pdev)
}
}
static
struct
pci_device_id
ichxrom_pci_tbl
[]
__devinitdata
=
{
static
struct
pci_device_id
ichxrom_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801BA_0
,
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801BA_0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801CA_0
,
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801CA_0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801DB_0
,
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801DB_0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801EB_0
,
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801EB_0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
},
PCI_ANY_ID
,
PCI_ANY_ID
,
},
...
...
drivers/mtd/maps/impa7.c
View file @
69f34c98
/*
/*
* $Id: impa7.c,v 1.1
3 2004/11/04 13:24:14
gleixner Exp $
* $Id: impa7.c,v 1.1
4 2005/11/07 11:14:27
gleixner Exp $
*
*
* Handle mapping of the NOR flash on implementa A7 boards
* Handle mapping of the NOR flash on implementa A7 boards
*
*
* Copyright 2002 SYSGO Real-Time Solutions GmbH
* Copyright 2002 SYSGO Real-Time Solutions GmbH
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
@@ -55,7 +55,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
...
@@ -55,7 +55,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
/*
/*
* MTD partitioning stuff
* MTD partitioning stuff
*/
*/
static
struct
mtd_partition
static_partitions
[]
=
static
struct
mtd_partition
static_partitions
[]
=
{
{
...
@@ -108,9 +108,9 @@ int __init init_impa7(void)
...
@@ -108,9 +108,9 @@ int __init init_impa7(void)
impa7_mtd
[
i
]
->
owner
=
THIS_MODULE
;
impa7_mtd
[
i
]
->
owner
=
THIS_MODULE
;
devicesfound
++
;
devicesfound
++
;
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
mtd_parts_nb
[
i
]
=
parse_mtd_partitions
(
impa7_mtd
[
i
],
mtd_parts_nb
[
i
]
=
parse_mtd_partitions
(
impa7_mtd
[
i
],
probes
,
probes
,
&
mtd_parts
[
i
],
&
mtd_parts
[
i
],
0
);
0
);
if
(
mtd_parts_nb
[
i
]
>
0
)
{
if
(
mtd_parts_nb
[
i
]
>
0
)
{
part_type
=
"command line"
;
part_type
=
"command line"
;
...
@@ -121,16 +121,16 @@ int __init init_impa7(void)
...
@@ -121,16 +121,16 @@ int __init init_impa7(void)
}
}
printk
(
KERN_NOTICE
MSG_PREFIX
printk
(
KERN_NOTICE
MSG_PREFIX
"using %s partition definition
\n
"
,
"using %s partition definition
\n
"
,
part_type
);
part_type
);
add_mtd_partitions
(
impa7_mtd
[
i
],
add_mtd_partitions
(
impa7_mtd
[
i
],
mtd_parts
[
i
],
mtd_parts_nb
[
i
]);
mtd_parts
[
i
],
mtd_parts_nb
[
i
]);
#else
#else
add_mtd_device
(
impa7_mtd
[
i
]);
add_mtd_device
(
impa7_mtd
[
i
]);
#endif
#endif
}
}
else
else
iounmap
((
void
*
)
impa7_map
[
i
].
virt
);
iounmap
((
void
*
)
impa7_map
[
i
].
virt
);
}
}
return
devicesfound
==
0
?
-
ENXIO
:
0
;
return
devicesfound
==
0
?
-
ENXIO
:
0
;
...
...
drivers/mtd/maps/integrator-flash.c
View file @
69f34c98
/*======================================================================
/*======================================================================
drivers/mtd/maps/integrator-flash.c: ARM Integrator flash map driver
drivers/mtd/maps/integrator-flash.c: ARM Integrator flash map driver
Copyright (C) 2000 ARM Limited
Copyright (C) 2000 ARM Limited
Copyright (C) 2003 Deep Blue Solutions Ltd.
Copyright (C) 2003 Deep Blue Solutions Ltd.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
This is access code for flashes using ARM's flash partitioning
This is access code for flashes using ARM's flash partitioning
standards.
standards.
$Id: integrator-flash.c,v 1.
18 2004/11/01 13:26:15 rmk
Exp $
$Id: integrator-flash.c,v 1.
20 2005/11/07 11:14:27 gleixner
Exp $
======================================================================*/
======================================================================*/
...
...
drivers/mtd/maps/ipaq-flash.c
View file @
69f34c98
/*
/*
* Flash memory access on iPAQ Handhelds (either SA1100 or PXA250 based)
* Flash memory access on iPAQ Handhelds (either SA1100 or PXA250 based)
*
*
* (C) 2000 Nicolas Pitre <nico@cam.org>
* (C) 2000 Nicolas Pitre <nico@cam.org>
* (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com>
* (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com>
* (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes
* (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes
*
*
* $Id: ipaq-flash.c,v 1.
3 2004/11/04 13:24:15
gleixner Exp $
* $Id: ipaq-flash.c,v 1.
5 2005/11/07 11:14:27
gleixner Exp $
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -107,7 +107,7 @@ static struct mtd_partition h3xxx_partitions[] = {
...
@@ -107,7 +107,7 @@ static struct mtd_partition h3xxx_partitions[] = {
#ifndef CONFIG_LAB
#ifndef CONFIG_LAB
mask_flags:
MTD_WRITEABLE
,
/* force read-only */
mask_flags:
MTD_WRITEABLE
,
/* force read-only */
#endif
#endif
},
},
{
{
name:
"H3XXX root jffs2"
,
name:
"H3XXX root jffs2"
,
#ifndef CONFIG_LAB
#ifndef CONFIG_LAB
...
@@ -148,7 +148,7 @@ static DEFINE_SPINLOCK(ipaq_vpp_lock);
...
@@ -148,7 +148,7 @@ static DEFINE_SPINLOCK(ipaq_vpp_lock);
static
void
h3xxx_set_vpp
(
struct
map_info
*
map
,
int
vpp
)
static
void
h3xxx_set_vpp
(
struct
map_info
*
map
,
int
vpp
)
{
{
static
int
nest
=
0
;
static
int
nest
=
0
;
spin_lock
(
&
ipaq_vpp_lock
);
spin_lock
(
&
ipaq_vpp_lock
);
if
(
vpp
)
if
(
vpp
)
nest
++
;
nest
++
;
...
@@ -191,7 +191,7 @@ static unsigned long cs_phys[] = {
...
@@ -191,7 +191,7 @@ static unsigned long cs_phys[] = {
SA1100_CS3_PHYS
,
SA1100_CS3_PHYS
,
SA1100_CS4_PHYS
,
SA1100_CS4_PHYS
,
SA1100_CS5_PHYS
,
SA1100_CS5_PHYS
,
#else
#else
PXA_CS0_PHYS
,
PXA_CS0_PHYS
,
PXA_CS1_PHYS
,
PXA_CS1_PHYS
,
PXA_CS2_PHYS
,
PXA_CS2_PHYS
,
...
@@ -216,7 +216,7 @@ int __init ipaq_mtd_init(void)
...
@@ -216,7 +216,7 @@ int __init ipaq_mtd_init(void)
/* Default flash bankwidth */
/* Default flash bankwidth */
// ipaq_map.bankwidth = (MSC0 & MSC_RBW) ? 2 : 4;
// ipaq_map.bankwidth = (MSC0 & MSC_RBW) ? 2 : 4;
if
(
machine_is_h1900
())
if
(
machine_is_h1900
())
{
{
/* For our intents, the h1900 is not a real iPAQ, so we special-case it. */
/* For our intents, the h1900 is not a real iPAQ, so we special-case it. */
...
@@ -229,7 +229,7 @@ int __init ipaq_mtd_init(void)
...
@@ -229,7 +229,7 @@ int __init ipaq_mtd_init(void)
else
else
for
(
i
=
0
;
i
<
MAX_IPAQ_CS
;
i
++
)
for
(
i
=
0
;
i
<
MAX_IPAQ_CS
;
i
++
)
ipaq_map
[
i
].
bankwidth
=
4
;
ipaq_map
[
i
].
bankwidth
=
4
;
/*
/*
* Static partition definition selection
* Static partition definition selection
*/
*/
...
@@ -309,7 +309,7 @@ int __init ipaq_mtd_init(void)
...
@@ -309,7 +309,7 @@ int __init ipaq_mtd_init(void)
return
-
ENXIO
;
return
-
ENXIO
;
}
else
}
else
printk
(
KERN_NOTICE
"iPAQ flash: found %d bytes
\n
"
,
my_sub_mtd
[
i
]
->
size
);
printk
(
KERN_NOTICE
"iPAQ flash: found %d bytes
\n
"
,
my_sub_mtd
[
i
]
->
size
);
/* do we really need this debugging? --joshua 20030703 */
/* do we really need this debugging? --joshua 20030703 */
// printk("my_sub_mtd[%d]=%p\n", i, my_sub_mtd[i]);
// printk("my_sub_mtd[%d]=%p\n", i, my_sub_mtd[i]);
my_sub_mtd
[
i
]
->
owner
=
THIS_MODULE
;
my_sub_mtd
[
i
]
->
owner
=
THIS_MODULE
;
...
@@ -333,11 +333,11 @@ int __init ipaq_mtd_init(void)
...
@@ -333,11 +333,11 @@ int __init ipaq_mtd_init(void)
#else
#else
mymtd
=
my_sub_mtd
[
0
];
mymtd
=
my_sub_mtd
[
0
];
/*
/*
*In the very near future, command line partition parsing
*In the very near future, command line partition parsing
* will use the device name as 'mtd-id' instead of a value
* will use the device name as 'mtd-id' instead of a value
* passed to the parse_cmdline_partitions() routine. Since
* passed to the parse_cmdline_partitions() routine. Since
* the bootldr says 'ipaq', make sure it continues to work.
* the bootldr says 'ipaq', make sure it continues to work.
*/
*/
mymtd
->
name
=
"ipaq"
;
mymtd
->
name
=
"ipaq"
;
...
@@ -385,7 +385,7 @@ int __init ipaq_mtd_init(void)
...
@@ -385,7 +385,7 @@ int __init ipaq_mtd_init(void)
*/
*/
i
=
parse_mtd_partitions
(
mymtd
,
part_probes
,
&
parsed_parts
,
0
);
i
=
parse_mtd_partitions
(
mymtd
,
part_probes
,
&
parsed_parts
,
0
);
if
(
i
>
0
)
{
if
(
i
>
0
)
{
nb_parts
=
parsed_nr_parts
=
i
;
nb_parts
=
parsed_nr_parts
=
i
;
parts
=
parsed_parts
;
parts
=
parsed_parts
;
...
@@ -423,10 +423,10 @@ static void __exit ipaq_mtd_cleanup(void)
...
@@ -423,10 +423,10 @@ static void __exit ipaq_mtd_cleanup(void)
#endif
#endif
map_destroy
(
mymtd
);
map_destroy
(
mymtd
);
#ifdef CONFIG_MTD_CONCAT
#ifdef CONFIG_MTD_CONCAT
for
(
i
=
0
;
i
<
MAX_IPAQ_CS
;
i
++
)
for
(
i
=
0
;
i
<
MAX_IPAQ_CS
;
i
++
)
#else
#else
for
(
i
=
1
;
i
<
MAX_IPAQ_CS
;
i
++
)
for
(
i
=
1
;
i
<
MAX_IPAQ_CS
;
i
++
)
#endif
#endif
{
{
if
(
my_sub_mtd
[
i
])
if
(
my_sub_mtd
[
i
])
map_destroy
(
my_sub_mtd
[
i
]);
map_destroy
(
my_sub_mtd
[
i
]);
...
@@ -445,14 +445,14 @@ static int __init h1900_special_case(void)
...
@@ -445,14 +445,14 @@ static int __init h1900_special_case(void)
ipaq_map
[
0
].
phys
=
0x0
;
ipaq_map
[
0
].
phys
=
0x0
;
ipaq_map
[
0
].
virt
=
__ioremap
(
0x0
,
0x04000000
,
0
,
1
);
ipaq_map
[
0
].
virt
=
__ioremap
(
0x0
,
0x04000000
,
0
,
1
);
ipaq_map
[
0
].
bankwidth
=
2
;
ipaq_map
[
0
].
bankwidth
=
2
;
printk
(
KERN_NOTICE
"iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.
\n
"
,
ipaq_map
[
0
].
bankwidth
*
8
,
ipaq_map
[
0
].
virt
);
printk
(
KERN_NOTICE
"iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.
\n
"
,
ipaq_map
[
0
].
bankwidth
*
8
,
ipaq_map
[
0
].
virt
);
mymtd
=
do_map_probe
(
"jedec_probe"
,
&
ipaq_map
[
0
]);
mymtd
=
do_map_probe
(
"jedec_probe"
,
&
ipaq_map
[
0
]);
if
(
!
mymtd
)
if
(
!
mymtd
)
return
-
ENODEV
;
return
-
ENODEV
;
add_mtd_device
(
mymtd
);
add_mtd_device
(
mymtd
);
printk
(
KERN_NOTICE
"iPAQ flash: registered h1910 flash
\n
"
);
printk
(
KERN_NOTICE
"iPAQ flash: registered h1910 flash
\n
"
);
return
0
;
return
0
;
}
}
...
...
drivers/mtd/maps/iq80310.c
View file @
69f34c98
/*
/*
* $Id: iq80310.c,v 1.2
0 2004/11/04 13:24:15
gleixner Exp $
* $Id: iq80310.c,v 1.2
1 2005/11/07 11:14:27
gleixner Exp $
*
*
* Mapping for the Intel XScale IQ80310 evaluation board
* Mapping for the Intel XScale IQ80310 evaluation board
*
*
* Author: Nicolas Pitre
* Author: Nicolas Pitre
* Copyright: (C) 2001 MontaVista Software Inc.
* Copyright: (C) 2001 MontaVista Software Inc.
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
...
drivers/mtd/maps/ixp2000.c
View file @
69f34c98
/*
/*
* $Id: ixp2000.c,v 1.
8 2005/11/07 08:09:02
gleixner Exp $
* $Id: ixp2000.c,v 1.
9 2005/11/07 11:14:27
gleixner Exp $
*
*
* drivers/mtd/maps/ixp2000.c
* drivers/mtd/maps/ixp2000.c
*
*
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
*
*
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -46,8 +46,8 @@ struct ixp2000_flash_info {
...
@@ -46,8 +46,8 @@ struct ixp2000_flash_info {
};
};
static
inline
unsigned
long
flash_bank_setup
(
struct
map_info
*
map
,
unsigned
long
ofs
)
static
inline
unsigned
long
flash_bank_setup
(
struct
map_info
*
map
,
unsigned
long
ofs
)
{
{
unsigned
long
(
*
set_bank
)(
unsigned
long
)
=
unsigned
long
(
*
set_bank
)(
unsigned
long
)
=
(
unsigned
long
(
*
)(
unsigned
long
))
map
->
map_priv_2
;
(
unsigned
long
(
*
)(
unsigned
long
))
map
->
map_priv_2
;
return
(
set_bank
?
set_bank
(
ofs
)
:
ofs
);
return
(
set_bank
?
set_bank
(
ofs
)
:
ofs
);
...
@@ -55,8 +55,8 @@ static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long
...
@@ -55,8 +55,8 @@ static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long
#ifdef __ARMEB__
#ifdef __ARMEB__
/*
/*
* Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which
* Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which
* causes the lower address bits to be XORed with 0x11 on 8 bit accesses
* causes the lower address bits to be XORed with 0x11 on 8 bit accesses
* and XORed with 0x10 on 16 bit accesses. See the spec update, erratum 44.
* and XORed with 0x10 on 16 bit accesses. See the spec update, erratum 44.
*/
*/
static
int
erratum44_workaround
=
0
;
static
int
erratum44_workaround
=
0
;
...
@@ -90,7 +90,7 @@ static void ixp2000_flash_copy_from(struct map_info *map, void *to,
...
@@ -90,7 +90,7 @@ static void ixp2000_flash_copy_from(struct map_info *map, void *to,
unsigned
long
from
,
ssize_t
len
)
unsigned
long
from
,
ssize_t
len
)
{
{
from
=
flash_bank_setup
(
map
,
from
);
from
=
flash_bank_setup
(
map
,
from
);
while
(
len
--
)
while
(
len
--
)
*
(
__u8
*
)
to
++
=
*
(
__u8
*
)(
map
->
map_priv_1
+
from
++
);
*
(
__u8
*
)
to
++
=
*
(
__u8
*
)(
map
->
map_priv_1
+
from
++
);
}
}
...
@@ -149,11 +149,11 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -149,11 +149,11 @@ static int ixp2000_flash_probe(struct device *_dev)
static
const
char
*
probes
[]
=
{
"RedBoot"
,
"cmdlinepart"
,
NULL
};
static
const
char
*
probes
[]
=
{
"RedBoot"
,
"cmdlinepart"
,
NULL
};
struct
platform_device
*
dev
=
to_platform_device
(
_dev
);
struct
platform_device
*
dev
=
to_platform_device
(
_dev
);
struct
ixp2000_flash_data
*
ixp_data
=
dev
->
dev
.
platform_data
;
struct
ixp2000_flash_data
*
ixp_data
=
dev
->
dev
.
platform_data
;
struct
flash_platform_data
*
plat
;
struct
flash_platform_data
*
plat
;
struct
ixp2000_flash_info
*
info
;
struct
ixp2000_flash_info
*
info
;
unsigned
long
window_size
;
unsigned
long
window_size
;
int
err
=
-
1
;
int
err
=
-
1
;
if
(
!
ixp_data
)
if
(
!
ixp_data
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -162,7 +162,7 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -162,7 +162,7 @@ static int ixp2000_flash_probe(struct device *_dev)
return
-
ENODEV
;
return
-
ENODEV
;
window_size
=
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
;
window_size
=
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
;
dev_info
(
_dev
,
"Probe of IXP2000 flash(%d banks x %dMiB)
\n
"
,
dev_info
(
_dev
,
"Probe of IXP2000 flash(%d banks x %dMiB)
\n
"
,
ixp_data
->
nr_banks
,
((
u32
)
window_size
>>
20
));
ixp_data
->
nr_banks
,
((
u32
)
window_size
>>
20
));
if
(
plat
->
width
!=
1
)
{
if
(
plat
->
width
!=
1
)
{
...
@@ -175,7 +175,7 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -175,7 +175,7 @@ static int ixp2000_flash_probe(struct device *_dev)
if
(
!
info
)
{
if
(
!
info
)
{
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
Error
;
goto
Error
;
}
}
memzero
(
info
,
sizeof
(
struct
ixp2000_flash_info
));
memzero
(
info
,
sizeof
(
struct
ixp2000_flash_info
));
dev_set_drvdata
(
&
dev
->
dev
,
info
);
dev_set_drvdata
(
&
dev
->
dev
,
info
);
...
@@ -185,7 +185,7 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -185,7 +185,7 @@ static int ixp2000_flash_probe(struct device *_dev)
* not attempt to do a direct access on us.
* not attempt to do a direct access on us.
*/
*/
info
->
map
.
phys
=
NO_XIP
;
info
->
map
.
phys
=
NO_XIP
;
info
->
nr_banks
=
ixp_data
->
nr_banks
;
info
->
nr_banks
=
ixp_data
->
nr_banks
;
info
->
map
.
size
=
ixp_data
->
nr_banks
*
window_size
;
info
->
map
.
size
=
ixp_data
->
nr_banks
*
window_size
;
info
->
map
.
bankwidth
=
1
;
info
->
map
.
bankwidth
=
1
;
...
@@ -201,8 +201,8 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -201,8 +201,8 @@ static int ixp2000_flash_probe(struct device *_dev)
info
->
map
.
copy_from
=
ixp2000_flash_copy_from
;
info
->
map
.
copy_from
=
ixp2000_flash_copy_from
;
info
->
map
.
copy_to
=
ixp2000_flash_copy_to
;
info
->
map
.
copy_to
=
ixp2000_flash_copy_to
;
info
->
res
=
request_mem_region
(
dev
->
resource
->
start
,
info
->
res
=
request_mem_region
(
dev
->
resource
->
start
,
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
,
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
,
dev
->
dev
.
bus_id
);
dev
->
dev
.
bus_id
);
if
(
!
info
->
res
)
{
if
(
!
info
->
res
)
{
dev_err
(
_dev
,
"Could not reserve memory region
\n
"
);
dev_err
(
_dev
,
"Could not reserve memory region
\n
"
);
...
@@ -210,7 +210,7 @@ static int ixp2000_flash_probe(struct device *_dev)
...
@@ -210,7 +210,7 @@ static int ixp2000_flash_probe(struct device *_dev)
goto
Error
;
goto
Error
;
}
}
info
->
map
.
map_priv_1
=
(
unsigned
long
)
ioremap
(
dev
->
resource
->
start
,
info
->
map
.
map_priv_1
=
(
unsigned
long
)
ioremap
(
dev
->
resource
->
start
,
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
);
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
);
if
(
!
info
->
map
.
map_priv_1
)
{
if
(
!
info
->
map
.
map_priv_1
)
{
dev_err
(
_dev
,
"Failed to ioremap flash region
\n
"
);
dev_err
(
_dev
,
"Failed to ioremap flash region
\n
"
);
...
...
drivers/mtd/maps/ixp4xx.c
View file @
69f34c98
/*
/*
* $Id: ixp4xx.c,v 1.1
1 2005/11/06 11:15:51
gleixner Exp $
* $Id: ixp4xx.c,v 1.1
2 2005/11/07 11:14:27
gleixner Exp $
*
*
* drivers/mtd/maps/ixp4xx.c
* drivers/mtd/maps/ixp4xx.c
*
*
...
@@ -72,7 +72,7 @@ static void ixp4xx_copy_from(struct map_info *map, void *to,
...
@@ -72,7 +72,7 @@ static void ixp4xx_copy_from(struct map_info *map, void *to,
dest
[
len
-
1
]
=
BYTE0
(
le16_to_cpu
(
readw
(
src
+
2
*
i
)));
dest
[
len
-
1
]
=
BYTE0
(
le16_to_cpu
(
readw
(
src
+
2
*
i
)));
}
}
/*
/*
* Unaligned writes are ignored, causing the 8-bit
* Unaligned writes are ignored, causing the 8-bit
* probe to fail and proceed to the 16-bit probe (which succeeds).
* probe to fail and proceed to the 16-bit probe (which succeeds).
*/
*/
...
@@ -82,7 +82,7 @@ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long
...
@@ -82,7 +82,7 @@ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long
writew
(
cpu_to_le16
(
d
.
x
[
0
]),
map
->
virt
+
adr
);
writew
(
cpu_to_le16
(
d
.
x
[
0
]),
map
->
virt
+
adr
);
}
}
/*
/*
* Fast write16 function without the probing check above
* Fast write16 function without the probing check above
*/
*/
static
void
ixp4xx_write16
(
struct
map_info
*
map
,
map_word
d
,
unsigned
long
adr
)
static
void
ixp4xx_write16
(
struct
map_info
*
map
,
map_word
d
,
unsigned
long
adr
)
...
@@ -151,7 +151,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
...
@@ -151,7 +151,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
if
(
!
info
)
{
if
(
!
info
)
{
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
Error
;
goto
Error
;
}
}
memzero
(
info
,
sizeof
(
struct
ixp4xx_flash_info
));
memzero
(
info
,
sizeof
(
struct
ixp4xx_flash_info
));
dev_set_drvdata
(
&
dev
->
dev
,
info
);
dev_set_drvdata
(
&
dev
->
dev
,
info
);
...
@@ -174,8 +174,8 @@ static int ixp4xx_flash_probe(struct device *_dev)
...
@@ -174,8 +174,8 @@ static int ixp4xx_flash_probe(struct device *_dev)
info
->
map
.
write
=
ixp4xx_probe_write16
,
info
->
map
.
write
=
ixp4xx_probe_write16
,
info
->
map
.
copy_from
=
ixp4xx_copy_from
,
info
->
map
.
copy_from
=
ixp4xx_copy_from
,
info
->
res
=
request_mem_region
(
dev
->
resource
->
start
,
info
->
res
=
request_mem_region
(
dev
->
resource
->
start
,
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
,
dev
->
resource
->
end
-
dev
->
resource
->
start
+
1
,
"IXP4XXFlash"
);
"IXP4XXFlash"
);
if
(
!
info
->
res
)
{
if
(
!
info
->
res
)
{
printk
(
KERN_ERR
"IXP4XXFlash: Could not reserve memory region
\n
"
);
printk
(
KERN_ERR
"IXP4XXFlash: Could not reserve memory region
\n
"
);
...
@@ -198,7 +198,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
...
@@ -198,7 +198,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
goto
Error
;
goto
Error
;
}
}
info
->
mtd
->
owner
=
THIS_MODULE
;
info
->
mtd
->
owner
=
THIS_MODULE
;
/* Use the fast version */
/* Use the fast version */
info
->
map
.
write
=
ixp4xx_write16
,
info
->
map
.
write
=
ixp4xx_write16
,
...
...
drivers/mtd/maps/l440gx.c
View file @
69f34c98
/*
/*
* $Id: l440gx.c,v 1.1
7 2004/11/28 09:40:39 dwmw2
Exp $
* $Id: l440gx.c,v 1.1
8 2005/11/07 11:14:27 gleixner
Exp $
*
*
* BIOS Flash chip on Intel 440GX board.
* BIOS Flash chip on Intel 440GX board.
*
*
...
@@ -49,7 +49,7 @@ static struct map_info l440gx_map = {
...
@@ -49,7 +49,7 @@ static struct map_info l440gx_map = {
.
bankwidth
=
BUSWIDTH
,
.
bankwidth
=
BUSWIDTH
,
.
phys
=
WINDOW_ADDR
,
.
phys
=
WINDOW_ADDR
,
#if 0
#if 0
/* FIXME verify that this is the
/* FIXME verify that this is the
* appripriate code for vpp enable/disable
* appripriate code for vpp enable/disable
*/
*/
.set_vpp = l440gx_set_vpp
.set_vpp = l440gx_set_vpp
...
@@ -62,10 +62,10 @@ static int __init init_l440gx(void)
...
@@ -62,10 +62,10 @@ static int __init init_l440gx(void)
struct
resource
*
pm_iobase
;
struct
resource
*
pm_iobase
;
__u16
word
;
__u16
word
;
dev
=
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
dev
=
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371AB_0
,
NULL
);
PCI_DEVICE_ID_INTEL_82371AB_0
,
NULL
);
pm_dev
=
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
pm_dev
=
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371AB_3
,
NULL
);
PCI_DEVICE_ID_INTEL_82371AB_3
,
NULL
);
if
(
!
dev
||
!
pm_dev
)
{
if
(
!
dev
||
!
pm_dev
)
{
...
@@ -82,10 +82,10 @@ static int __init init_l440gx(void)
...
@@ -82,10 +82,10 @@ static int __init init_l440gx(void)
simple_map_init
(
&
l440gx_map
);
simple_map_init
(
&
l440gx_map
);
printk
(
KERN_NOTICE
"window_addr = 0x%08lx
\n
"
,
(
unsigned
long
)
l440gx_map
.
virt
);
printk
(
KERN_NOTICE
"window_addr = 0x%08lx
\n
"
,
(
unsigned
long
)
l440gx_map
.
virt
);
/* Setup the pm iobase resource
/* Setup the pm iobase resource
* This code should move into some kind of generic bridge
* This code should move into some kind of generic bridge
* driver but for the moment I'm content with getting the
* driver but for the moment I'm content with getting the
* allocation correct.
* allocation correct.
*/
*/
pm_iobase
=
&
pm_dev
->
resource
[
PIIXE_IOBASE_RESOURCE
];
pm_iobase
=
&
pm_dev
->
resource
[
PIIXE_IOBASE_RESOURCE
];
if
(
!
(
pm_iobase
->
flags
&
IORESOURCE_IO
))
{
if
(
!
(
pm_iobase
->
flags
&
IORESOURCE_IO
))
{
...
@@ -110,7 +110,7 @@ static int __init init_l440gx(void)
...
@@ -110,7 +110,7 @@ static int __init init_l440gx(void)
/* Set the iobase */
/* Set the iobase */
iobase
=
pm_iobase
->
start
;
iobase
=
pm_iobase
->
start
;
pci_write_config_dword
(
pm_dev
,
0x40
,
iobase
|
1
);
pci_write_config_dword
(
pm_dev
,
0x40
,
iobase
|
1
);
/* Set XBCS# */
/* Set XBCS# */
pci_read_config_word
(
dev
,
0x4e
,
&
word
);
pci_read_config_word
(
dev
,
0x4e
,
&
word
);
...
@@ -122,7 +122,7 @@ static int __init init_l440gx(void)
...
@@ -122,7 +122,7 @@ static int __init init_l440gx(void)
/* Enable the gate on the WE line */
/* Enable the gate on the WE line */
outb
(
inb
(
TRIBUF_PORT
)
&
~
1
,
TRIBUF_PORT
);
outb
(
inb
(
TRIBUF_PORT
)
&
~
1
,
TRIBUF_PORT
);
printk
(
KERN_NOTICE
"Enabled WE line to L440GX BIOS flash chip.
\n
"
);
printk
(
KERN_NOTICE
"Enabled WE line to L440GX BIOS flash chip.
\n
"
);
mymtd
=
do_map_probe
(
"jedec_probe"
,
&
l440gx_map
);
mymtd
=
do_map_probe
(
"jedec_probe"
,
&
l440gx_map
);
...
@@ -145,7 +145,7 @@ static void __exit cleanup_l440gx(void)
...
@@ -145,7 +145,7 @@ static void __exit cleanup_l440gx(void)
{
{
del_mtd_device
(
mymtd
);
del_mtd_device
(
mymtd
);
map_destroy
(
mymtd
);
map_destroy
(
mymtd
);
iounmap
(
l440gx_map
.
virt
);
iounmap
(
l440gx_map
.
virt
);
}
}
...
...
drivers/mtd/maps/lubbock-flash.c
View file @
69f34c98
/*
/*
* $Id: lubbock-flash.c,v 1.
19 2004/11/04 13:24:15
gleixner Exp $
* $Id: lubbock-flash.c,v 1.
21 2005/11/07 11:14:27
gleixner Exp $
*
*
* Map driver for the Lubbock developer platform.
* Map driver for the Lubbock developer platform.
*
*
* Author: Nicolas Pitre
* Author: Nicolas Pitre
* Copyright: (C) 2001 MontaVista Software Inc.
* Copyright: (C) 2001 MontaVista Software Inc.
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
@@ -76,7 +76,7 @@ static int __init init_lubbock(void)
...
@@ -76,7 +76,7 @@ static int __init init_lubbock(void)
int
flashboot
=
(
LUB_CONF_SWITCHES
&
1
);
int
flashboot
=
(
LUB_CONF_SWITCHES
&
1
);
int
ret
=
0
,
i
;
int
ret
=
0
,
i
;
lubbock_maps
[
0
].
bankwidth
=
lubbock_maps
[
1
].
bankwidth
=
lubbock_maps
[
0
].
bankwidth
=
lubbock_maps
[
1
].
bankwidth
=
(
BOOT_DEF
&
1
)
?
2
:
4
;
(
BOOT_DEF
&
1
)
?
2
:
4
;
/* Compensate for the nROMBT switch which swaps the flash banks */
/* Compensate for the nROMBT switch which swaps the flash banks */
...
@@ -100,11 +100,11 @@ static int __init init_lubbock(void)
...
@@ -100,11 +100,11 @@ static int __init init_lubbock(void)
simple_map_init
(
&
lubbock_maps
[
i
]);
simple_map_init
(
&
lubbock_maps
[
i
]);
printk
(
KERN_NOTICE
"Probing %s at physical address 0x%08lx (%d-bit bankwidth)
\n
"
,
printk
(
KERN_NOTICE
"Probing %s at physical address 0x%08lx (%d-bit bankwidth)
\n
"
,
lubbock_maps
[
i
].
name
,
lubbock_maps
[
i
].
phys
,
lubbock_maps
[
i
].
name
,
lubbock_maps
[
i
].
phys
,
lubbock_maps
[
i
].
bankwidth
*
8
);
lubbock_maps
[
i
].
bankwidth
*
8
);
mymtds
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
lubbock_maps
[
i
]);
mymtds
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
lubbock_maps
[
i
]);
if
(
!
mymtds
[
i
])
{
if
(
!
mymtds
[
i
])
{
iounmap
((
void
*
)
lubbock_maps
[
i
].
virt
);
iounmap
((
void
*
)
lubbock_maps
[
i
].
virt
);
if
(
lubbock_maps
[
i
].
cached
)
if
(
lubbock_maps
[
i
].
cached
)
...
@@ -124,7 +124,7 @@ static int __init init_lubbock(void)
...
@@ -124,7 +124,7 @@ static int __init init_lubbock(void)
if
(
!
mymtds
[
0
]
&&
!
mymtds
[
1
])
if
(
!
mymtds
[
0
]
&&
!
mymtds
[
1
])
return
ret
;
return
ret
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
!
mymtds
[
i
])
{
if
(
!
mymtds
[
i
])
{
printk
(
KERN_WARNING
"%s is absent. Skipping
\n
"
,
lubbock_maps
[
i
].
name
);
printk
(
KERN_WARNING
"%s is absent. Skipping
\n
"
,
lubbock_maps
[
i
].
name
);
...
@@ -151,7 +151,7 @@ static void __exit cleanup_lubbock(void)
...
@@ -151,7 +151,7 @@ static void __exit cleanup_lubbock(void)
if
(
nr_parsed_parts
[
i
]
||
!
i
)
if
(
nr_parsed_parts
[
i
]
||
!
i
)
del_mtd_partitions
(
mymtds
[
i
]);
del_mtd_partitions
(
mymtds
[
i
]);
else
else
del_mtd_device
(
mymtds
[
i
]);
del_mtd_device
(
mymtds
[
i
]);
map_destroy
(
mymtds
[
i
]);
map_destroy
(
mymtds
[
i
]);
iounmap
((
void
*
)
lubbock_maps
[
i
].
virt
);
iounmap
((
void
*
)
lubbock_maps
[
i
].
virt
);
...
...
drivers/mtd/maps/mainstone-flash.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Author: Nicolas Pitre
* Author: Nicolas Pitre
* Copyright: (C) 2001 MontaVista Software Inc.
* Copyright: (C) 2001 MontaVista Software Inc.
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
@@ -91,27 +91,27 @@ static int __init init_mainstone(void)
...
@@ -91,27 +91,27 @@ static int __init init_mainstone(void)
mainstone_maps
[
i
].
virt
=
ioremap
(
mainstone_maps
[
i
].
phys
,
mainstone_maps
[
i
].
virt
=
ioremap
(
mainstone_maps
[
i
].
phys
,
WINDOW_SIZE
);
WINDOW_SIZE
);
if
(
!
mainstone_maps
[
i
].
virt
)
{
if
(
!
mainstone_maps
[
i
].
virt
)
{
printk
(
KERN_WARNING
"Failed to ioremap %s
\n
"
,
printk
(
KERN_WARNING
"Failed to ioremap %s
\n
"
,
mainstone_maps
[
i
].
name
);
mainstone_maps
[
i
].
name
);
if
(
!
ret
)
if
(
!
ret
)
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
continue
;
continue
;
}
}
mainstone_maps
[
i
].
cached
=
mainstone_maps
[
i
].
cached
=
ioremap_cached
(
mainstone_maps
[
i
].
phys
,
WINDOW_SIZE
);
ioremap_cached
(
mainstone_maps
[
i
].
phys
,
WINDOW_SIZE
);
if
(
!
mainstone_maps
[
i
].
cached
)
if
(
!
mainstone_maps
[
i
].
cached
)
printk
(
KERN_WARNING
"Failed to ioremap cached %s
\n
"
,
printk
(
KERN_WARNING
"Failed to ioremap cached %s
\n
"
,
mainstone_maps
[
i
].
name
);
mainstone_maps
[
i
].
name
);
simple_map_init
(
&
mainstone_maps
[
i
]);
simple_map_init
(
&
mainstone_maps
[
i
]);
printk
(
KERN_NOTICE
printk
(
KERN_NOTICE
"Probing %s at physical address 0x%08lx"
"Probing %s at physical address 0x%08lx"
" (%d-bit bankwidth)
\n
"
,
" (%d-bit bankwidth)
\n
"
,
mainstone_maps
[
i
].
name
,
mainstone_maps
[
i
].
phys
,
mainstone_maps
[
i
].
name
,
mainstone_maps
[
i
].
phys
,
mainstone_maps
[
i
].
bankwidth
*
8
);
mainstone_maps
[
i
].
bankwidth
*
8
);
mymtds
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
mainstone_maps
[
i
]);
mymtds
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
mainstone_maps
[
i
]);
if
(
!
mymtds
[
i
])
{
if
(
!
mymtds
[
i
])
{
iounmap
((
void
*
)
mainstone_maps
[
i
].
virt
);
iounmap
((
void
*
)
mainstone_maps
[
i
].
virt
);
if
(
mainstone_maps
[
i
].
cached
)
if
(
mainstone_maps
[
i
].
cached
)
...
@@ -131,21 +131,21 @@ static int __init init_mainstone(void)
...
@@ -131,21 +131,21 @@ static int __init init_mainstone(void)
if
(
!
mymtds
[
0
]
&&
!
mymtds
[
1
])
if
(
!
mymtds
[
0
]
&&
!
mymtds
[
1
])
return
ret
;
return
ret
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
!
mymtds
[
i
])
{
if
(
!
mymtds
[
i
])
{
printk
(
KERN_WARNING
"%s is absent. Skipping
\n
"
,
printk
(
KERN_WARNING
"%s is absent. Skipping
\n
"
,
mainstone_maps
[
i
].
name
);
mainstone_maps
[
i
].
name
);
}
else
if
(
nr_parsed_parts
[
i
])
{
}
else
if
(
nr_parsed_parts
[
i
])
{
add_mtd_partitions
(
mymtds
[
i
],
parsed_parts
[
i
],
add_mtd_partitions
(
mymtds
[
i
],
parsed_parts
[
i
],
nr_parsed_parts
[
i
]);
nr_parsed_parts
[
i
]);
}
else
if
(
!
i
)
{
}
else
if
(
!
i
)
{
printk
(
"Using static partitions on %s
\n
"
,
printk
(
"Using static partitions on %s
\n
"
,
mainstone_maps
[
i
].
name
);
mainstone_maps
[
i
].
name
);
add_mtd_partitions
(
mymtds
[
i
],
mainstone_partitions
,
add_mtd_partitions
(
mymtds
[
i
],
mainstone_partitions
,
ARRAY_SIZE
(
mainstone_partitions
));
ARRAY_SIZE
(
mainstone_partitions
));
}
else
{
}
else
{
printk
(
"Registering %s as whole device
\n
"
,
printk
(
"Registering %s as whole device
\n
"
,
mainstone_maps
[
i
].
name
);
mainstone_maps
[
i
].
name
);
add_mtd_device
(
mymtds
[
i
]);
add_mtd_device
(
mymtds
[
i
]);
}
}
...
...
drivers/mtd/maps/mbx860.c
View file @
69f34c98
/*
/*
* $Id: mbx860.c,v 1.
8 2004/11/04 13:24:15
gleixner Exp $
* $Id: mbx860.c,v 1.
9 2005/11/07 11:14:27
gleixner Exp $
*
*
* Handle mapping of the flash on MBX860 boards
* Handle mapping of the flash on MBX860 boards
*
*
* Author: Anton Todorov
* Author: Anton Todorov
* Copyright: (C) 2001 Emness Technology
* Copyright: (C) 2001 Emness Technology
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
...
@@ -46,7 +46,7 @@ static struct mtd_partition partition_info[]={
...
@@ -46,7 +46,7 @@ static struct mtd_partition partition_info[]={
{
.
name
=
"MBX flash APPLICATION partition"
,
{
.
name
=
"MBX flash APPLICATION partition"
,
.
offset
=
(
BOOT_PARTITION_SIZE_KiB
+
KERNEL_PARTITION_SIZE_KiB
)
*
1024
}
.
offset
=
(
BOOT_PARTITION_SIZE_KiB
+
KERNEL_PARTITION_SIZE_KiB
)
*
1024
}
};
};
static
struct
mtd_info
*
mymtd
;
static
struct
mtd_info
*
mymtd
;
...
...
drivers/mtd/maps/mtx-1_flash.c
View file @
69f34c98
/*
/*
* Flash memory access on 4G Systems MTX-1 boards
* Flash memory access on 4G Systems MTX-1 boards
*
*
* $Id: mtx-1_flash.c,v 1.
1 2005/09/18 10:46:41 joern
Exp $
* $Id: mtx-1_flash.c,v 1.
2 2005/11/07 11:14:27 gleixner
Exp $
*
*
* (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz>
* (C) 2005 Bruno Randolf <bruno.randolf@4g-systems.biz>
* (C) 2005 Jrn Engel <joern@wohnheim.fh-wedel.de>
* (C) 2005 Jrn Engel <joern@wohnheim.fh-wedel.de>
...
@@ -66,7 +66,7 @@ int __init mtx1_mtd_init(void)
...
@@ -66,7 +66,7 @@ int __init mtx1_mtd_init(void)
mtx1_mtd
->
owner
=
THIS_MODULE
;
mtx1_mtd
->
owner
=
THIS_MODULE
;
ret
=
add_mtd_partitions
(
mtx1_mtd
,
mtx1_partitions
,
ret
=
add_mtd_partitions
(
mtx1_mtd
,
mtx1_partitions
,
ARRAY_SIZE
(
mtx1_partitions
));
ARRAY_SIZE
(
mtx1_partitions
));
if
(
ret
)
if
(
ret
)
goto
err
;
goto
err
;
...
...
drivers/mtd/maps/netsc520.c
View file @
69f34c98
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
* Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
* based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
* based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
*
*
* $Id: netsc520.c,v 1.1
3 2004/11/28 09:40:40 dwmw2
Exp $
* $Id: netsc520.c,v 1.1
4 2005/11/07 11:14:27 gleixner
Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
** The single, 16 megabyte flash bank is divided into four virtual
** The single, 16 megabyte flash bank is divided into four virtual
** partitions. The first partition is 768 KiB and is intended to
** partitions. The first partition is 768 KiB and is intended to
** store the kernel image loaded by the bootstrap loader. The second
** store the kernel image loaded by the bootstrap loader. The second
** partition is 256 KiB and holds the BIOS image. The third
** partition is 256 KiB and holds the BIOS image. The third
** partition is 14.5 MiB and is intended for the flash file system
** partition is 14.5 MiB and is intended for the flash file system
** image. The last partition is 512 KiB and contains another copy
** image. The last partition is 512 KiB and contains another copy
** of the BIOS image and the reset vector.
** of the BIOS image and the reset vector.
...
@@ -51,28 +51,28 @@
...
@@ -51,28 +51,28 @@
** recoverable afterwards.
** recoverable afterwards.
*/
*/
/* partition_info gives details on the logical partitions that the split the
/* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the
* single flash device into. If the size if zero we use up to the end of the
* device. */
* device. */
static
struct
mtd_partition
partition_info
[]
=
{
static
struct
mtd_partition
partition_info
[]
=
{
{
{
.
name
=
"NetSc520 boot kernel"
,
.
name
=
"NetSc520 boot kernel"
,
.
offset
=
0
,
.
offset
=
0
,
.
size
=
0xc0000
.
size
=
0xc0000
},
},
{
{
.
name
=
"NetSc520 Low BIOS"
,
.
name
=
"NetSc520 Low BIOS"
,
.
offset
=
0xc0000
,
.
offset
=
0xc0000
,
.
size
=
0x40000
.
size
=
0x40000
},
},
{
{
.
name
=
"NetSc520 file system"
,
.
name
=
"NetSc520 file system"
,
.
offset
=
0x100000
,
.
offset
=
0x100000
,
.
size
=
0xe80000
.
size
=
0xe80000
},
},
{
{
.
name
=
"NetSc520 High BIOS"
,
.
name
=
"NetSc520 High BIOS"
,
.
offset
=
0xf80000
,
.
offset
=
0xf80000
,
.
size
=
0x80000
.
size
=
0x80000
},
},
};
};
...
@@ -114,7 +114,7 @@ static int __init init_netsc520(void)
...
@@ -114,7 +114,7 @@ static int __init init_netsc520(void)
iounmap
(
netsc520_map
.
virt
);
iounmap
(
netsc520_map
.
virt
);
return
-
ENXIO
;
return
-
ENXIO
;
}
}
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
add_mtd_partitions
(
mymtd
,
partition_info
,
NUM_PARTITIONS
);
add_mtd_partitions
(
mymtd
,
partition_info
,
NUM_PARTITIONS
);
return
0
;
return
0
;
...
...
drivers/mtd/maps/nettel.c
View file @
69f34c98
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
* (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
*
*
* $Id: nettel.c,v 1.1
0 2005/01/05 17:11:29 dwmw2
Exp $
* $Id: nettel.c,v 1.1
1 2005/11/07 11:14:27 gleixner
Exp $
*/
*/
/****************************************************************************/
/****************************************************************************/
...
@@ -143,7 +143,7 @@ static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val,
...
@@ -143,7 +143,7 @@ static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val,
{
{
struct
cfi_private
*
cfi
=
nettel_intel_map
.
fldrv_priv
;
struct
cfi_private
*
cfi
=
nettel_intel_map
.
fldrv_priv
;
unsigned
long
b
;
unsigned
long
b
;
/* Make sure all FLASH chips are put back into read mode */
/* Make sure all FLASH chips are put back into read mode */
for
(
b
=
0
;
(
b
<
nettel_intel_partitions
[
3
].
size
);
b
+=
0x100000
)
{
for
(
b
=
0
;
(
b
<
nettel_intel_partitions
[
3
].
size
);
b
+=
0x100000
)
{
cfi_send_gen_cmd
(
0xff
,
0x55
,
b
,
&
nettel_intel_map
,
cfi
,
cfi_send_gen_cmd
(
0xff
,
0x55
,
b
,
&
nettel_intel_map
,
cfi
,
...
@@ -199,7 +199,7 @@ int nettel_eraseconfig(void)
...
@@ -199,7 +199,7 @@ int nettel_eraseconfig(void)
schedule
();
/* Wait for erase to finish. */
schedule
();
/* Wait for erase to finish. */
remove_wait_queue
(
&
wait_q
,
&
wait
);
remove_wait_queue
(
&
wait_q
,
&
wait
);
put_mtd_device
(
mtd
);
put_mtd_device
(
mtd
);
}
}
...
@@ -430,7 +430,7 @@ int __init nettel_init(void)
...
@@ -430,7 +430,7 @@ int __init nettel_init(void)
nettel_intel_partitions
[
1
].
size
=
(
intel0size
+
intel1size
)
-
nettel_intel_partitions
[
1
].
size
=
(
intel0size
+
intel1size
)
-
(
1024
*
1024
+
intel_mtd
->
erasesize
);
(
1024
*
1024
+
intel_mtd
->
erasesize
);
nettel_intel_partitions
[
3
].
size
=
intel0size
+
intel1size
;
nettel_intel_partitions
[
3
].
size
=
intel0size
+
intel1size
;
nettel_intel_partitions
[
4
].
offset
=
nettel_intel_partitions
[
4
].
offset
=
(
intel0size
+
intel1size
)
-
intel_mtd
->
erasesize
;
(
intel0size
+
intel1size
)
-
intel_mtd
->
erasesize
;
nettel_intel_partitions
[
4
].
size
=
intel_mtd
->
erasesize
;
nettel_intel_partitions
[
4
].
size
=
intel_mtd
->
erasesize
;
nettel_intel_partitions
[
5
].
offset
=
nettel_intel_partitions
[
5
].
offset
=
...
...
drivers/mtd/maps/ocelot.c
View file @
69f34c98
/*
/*
* $Id: ocelot.c,v 1.1
6 2005/01/05 18:05:13 dwmw2
Exp $
* $Id: ocelot.c,v 1.1
7 2005/11/07 11:14:27 gleixner
Exp $
*
*
* Flash on Momenco Ocelot
* Flash on Momenco Ocelot
*/
*/
...
@@ -31,7 +31,7 @@ static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t
...
@@ -31,7 +31,7 @@ static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t
struct
map_info
*
map
=
mtd
->
priv
;
struct
map_info
*
map
=
mtd
->
priv
;
size_t
done
=
0
;
size_t
done
=
0
;
/* If we use memcpy, it does word-wide writes. Even though we told the
/* If we use memcpy, it does word-wide writes. Even though we told the
GT64120A that it's an 8-bit wide region, word-wide writes don't work.
GT64120A that it's an 8-bit wide region, word-wide writes don't work.
We end up just writing the first byte of the four to all four bytes.
We end up just writing the first byte of the four to all four bytes.
So we have this loop instead */
So we have this loop instead */
...
@@ -68,7 +68,7 @@ static int __init init_ocelot_maps(void)
...
@@ -68,7 +68,7 @@ static int __init init_ocelot_maps(void)
int
nr_parts
;
int
nr_parts
;
unsigned
char
brd_status
;
unsigned
char
brd_status
;
printk
(
KERN_INFO
"Momenco Ocelot MTD mappings: Flash 0x%x at 0x%x, NVRAM 0x%x at 0x%x
\n
"
,
printk
(
KERN_INFO
"Momenco Ocelot MTD mappings: Flash 0x%x at 0x%x, NVRAM 0x%x at 0x%x
\n
"
,
FLASH_WINDOW_SIZE
,
FLASH_WINDOW_ADDR
,
NVRAM_WINDOW_SIZE
,
NVRAM_WINDOW_ADDR
);
FLASH_WINDOW_SIZE
,
FLASH_WINDOW_ADDR
,
NVRAM_WINDOW_SIZE
,
NVRAM_WINDOW_ADDR
);
/* First check whether the flash jumper is present */
/* First check whether the flash jumper is present */
...
@@ -138,8 +138,8 @@ static int __init init_ocelot_maps(void)
...
@@ -138,8 +138,8 @@ static int __init init_ocelot_maps(void)
add_mtd_device
(
flash_mtd
);
add_mtd_device
(
flash_mtd
);
return
0
;
return
0
;
fail3:
fail3:
iounmap
((
void
*
)
ocelot_flash_map
.
virt
);
iounmap
((
void
*
)
ocelot_flash_map
.
virt
);
if
(
ocelot_flash_map
.
cached
)
if
(
ocelot_flash_map
.
cached
)
iounmap
((
void
*
)
ocelot_flash_map
.
cached
);
iounmap
((
void
*
)
ocelot_flash_map
.
cached
);
...
...
drivers/mtd/maps/octagon-5066.c
View file @
69f34c98
// $Id: octagon-5066.c,v 1.2
6 2004/07/12 22:38:29 dwmw2
Exp $
// $Id: octagon-5066.c,v 1.2
8 2005/11/07 11:14:27 gleixner
Exp $
/* ######################################################################
/* ######################################################################
Octagon 5066 MTD Driver.
Octagon 5066 MTD Driver.
The Octagon 5066 is a SBC based on AMD's 586-WB running at 133 MHZ. It
The Octagon 5066 is a SBC based on AMD's 586-WB running at 133 MHZ. It
comes with a builtin AMD 29F016 flash chip and a socketed EEPROM that
comes with a builtin AMD 29F016 flash chip and a socketed EEPROM that
is replacable by flash. Both units are mapped through a multiplexer
is replacable by flash. Both units are mapped through a multiplexer
into a 32k memory window at 0xe8000. The control register for the
into a 32k memory window at 0xe8000. The control register for the
multiplexing unit is located at IO 0x208 with a bit map of
multiplexing unit is located at IO 0x208 with a bit map of
0-5 Page Selection in 32k increments
0-5 Page Selection in 32k increments
6-7 Device selection:
6-7 Device selection:
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
01 SSD 0 (Socket)
01 SSD 0 (Socket)
10 SSD 1 (Flash chip)
10 SSD 1 (Flash chip)
11 undefined
11 undefined
On each SSD, the first 128k is reserved for use by the bios
On each SSD, the first 128k is reserved for use by the bios
(actually it IS the bios..) This only matters if you are booting off the
(actually it IS the bios..) This only matters if you are booting off the
flash, you must not put a file system starting there.
flash, you must not put a file system starting there.
The driver tries to do a detection algorithm to guess what sort of devices
The driver tries to do a detection algorithm to guess what sort of devices
are plugged into the sockets.
are plugged into the sockets.
##################################################################### */
##################################################################### */
#include <linux/module.h>
#include <linux/module.h>
...
@@ -56,7 +56,7 @@ static void __oct5066_page(struct map_info *map, __u8 byte)
...
@@ -56,7 +56,7 @@ static void __oct5066_page(struct map_info *map, __u8 byte)
static
inline
void
oct5066_page
(
struct
map_info
*
map
,
unsigned
long
ofs
)
static
inline
void
oct5066_page
(
struct
map_info
*
map
,
unsigned
long
ofs
)
{
{
__u8
byte
=
map
->
map_priv_1
|
(
ofs
>>
WINDOW_SHIFT
);
__u8
byte
=
map
->
map_priv_1
|
(
ofs
>>
WINDOW_SHIFT
);
if
(
page_n_dev
!=
byte
)
if
(
page_n_dev
!=
byte
)
__oct5066_page
(
map
,
byte
);
__oct5066_page
(
map
,
byte
);
}
}
...
@@ -78,7 +78,7 @@ static void oct5066_copy_from(struct map_info *map, void *to, unsigned long from
...
@@ -78,7 +78,7 @@ static void oct5066_copy_from(struct map_info *map, void *to, unsigned long from
unsigned
long
thislen
=
len
;
unsigned
long
thislen
=
len
;
if
(
len
>
(
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
)))
if
(
len
>
(
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
)))
thislen
=
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
);
thislen
=
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
);
spin_lock
(
&
oct5066_spin
);
spin_lock
(
&
oct5066_spin
);
oct5066_page
(
map
,
from
);
oct5066_page
(
map
,
from
);
memcpy_fromio
(
to
,
iomapadr
+
from
,
thislen
);
memcpy_fromio
(
to
,
iomapadr
+
from
,
thislen
);
...
@@ -103,7 +103,7 @@ static void oct5066_copy_to(struct map_info *map, unsigned long to, const void *
...
@@ -103,7 +103,7 @@ static void oct5066_copy_to(struct map_info *map, unsigned long to, const void *
unsigned
long
thislen
=
len
;
unsigned
long
thislen
=
len
;
if
(
len
>
(
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
)))
if
(
len
>
(
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
)))
thislen
=
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
);
thislen
=
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
);
spin_lock
(
&
oct5066_spin
);
spin_lock
(
&
oct5066_spin
);
oct5066_page
(
map
,
to
);
oct5066_page
(
map
,
to
);
memcpy_toio
(
iomapadr
+
to
,
from
,
thislen
);
memcpy_toio
(
iomapadr
+
to
,
from
,
thislen
);
...
@@ -144,7 +144,7 @@ static struct mtd_info *oct5066_mtd[2] = {NULL, NULL};
...
@@ -144,7 +144,7 @@ static struct mtd_info *oct5066_mtd[2] = {NULL, NULL};
// OctProbe - Sense if this is an octagon card
// OctProbe - Sense if this is an octagon card
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
/* Perform a simple validity test, we map the window select SSD0 and
/* Perform a simple validity test, we map the window select SSD0 and
change pages while monitoring the window. A change in the window,
change pages while monitoring the window. A change in the window,
controlled by the PAGE_IO port is a functioning 5066 board. This will
controlled by the PAGE_IO port is a functioning 5066 board. This will
fail if the thing in the socket is set to a uniform value. */
fail if the thing in the socket is set to a uniform value. */
static
int
__init
OctProbe
(
void
)
static
int
__init
OctProbe
(
void
)
...
@@ -161,13 +161,13 @@ static int __init OctProbe(void)
...
@@ -161,13 +161,13 @@ static int __init OctProbe(void)
Values
[
I
%
10
]
=
readl
(
iomapadr
);
Values
[
I
%
10
]
=
readl
(
iomapadr
);
if
(
I
>
0
&&
Values
[
I
%
10
]
==
Values
[
0
])
if
(
I
>
0
&&
Values
[
I
%
10
]
==
Values
[
0
])
return
-
EAGAIN
;
return
-
EAGAIN
;
}
}
else
else
{
{
// Make sure we get the same values on the second pass
// Make sure we get the same values on the second pass
if
(
Values
[
I
%
10
]
!=
readl
(
iomapadr
))
if
(
Values
[
I
%
10
]
!=
readl
(
iomapadr
))
return
-
EAGAIN
;
return
-
EAGAIN
;
}
}
}
}
return
0
;
return
0
;
}
}
...
@@ -207,11 +207,11 @@ int __init init_oct5066(void)
...
@@ -207,11 +207,11 @@ int __init init_oct5066(void)
ret
=
-
EAGAIN
;
ret
=
-
EAGAIN
;
goto
out_unmap
;
goto
out_unmap
;
}
}
// Print out our little header..
// Print out our little header..
printk
(
"Octagon 5066 SSD IO:0x%x MEM:0x%x-0x%x
\n
"
,
PAGE_IO
,
WINDOW_START
,
printk
(
"Octagon 5066 SSD IO:0x%x MEM:0x%x-0x%x
\n
"
,
PAGE_IO
,
WINDOW_START
,
WINDOW_START
+
WINDOW_LENGTH
);
WINDOW_START
+
WINDOW_LENGTH
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
oct5066_mtd
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
oct5066_map
[
i
]);
oct5066_mtd
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
oct5066_map
[
i
]);
if
(
!
oct5066_mtd
[
i
])
if
(
!
oct5066_mtd
[
i
])
...
@@ -225,11 +225,11 @@ int __init init_oct5066(void)
...
@@ -225,11 +225,11 @@ int __init init_oct5066(void)
add_mtd_device
(
oct5066_mtd
[
i
]);
add_mtd_device
(
oct5066_mtd
[
i
]);
}
}
}
}
if
(
!
oct5066_mtd
[
0
]
&&
!
oct5066_mtd
[
1
])
{
if
(
!
oct5066_mtd
[
0
]
&&
!
oct5066_mtd
[
1
])
{
cleanup_oct5066
();
cleanup_oct5066
();
return
-
ENXIO
;
return
-
ENXIO
;
}
}
return
0
;
return
0
;
...
...
drivers/mtd/maps/omap-toto-flash.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* (C) 2002 MontVista Software, Inc.
* (C) 2002 MontVista Software, Inc.
*
*
* $Id: omap-toto-flash.c,v 1.
3 2004/09/16 23:27:13
gleixner Exp $
* $Id: omap-toto-flash.c,v 1.
5 2005/11/07 11:14:27
gleixner Exp $
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -38,7 +38,7 @@ static struct map_info omap_toto_map_flash = {
...
@@ -38,7 +38,7 @@ static struct map_info omap_toto_map_flash = {
.
virt
=
(
void
__iomem
*
)
OMAP_TOTO_FLASH_BASE
,
.
virt
=
(
void
__iomem
*
)
OMAP_TOTO_FLASH_BASE
,
};
};
static
struct
mtd_partition
toto_flash_partitions
[]
=
{
static
struct
mtd_partition
toto_flash_partitions
[]
=
{
{
{
.
name
=
"BootLoader"
,
.
name
=
"BootLoader"
,
...
@@ -54,21 +54,21 @@ static struct mtd_partition toto_flash_partitions[] = {
...
@@ -54,21 +54,21 @@ static struct mtd_partition toto_flash_partitions[] = {
.
name
=
"EnvArea"
,
/* bottom 64KiB for env vars */
.
name
=
"EnvArea"
,
/* bottom 64KiB for env vars */
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
MTDPART_OFS_APPEND
,
.
offset
=
MTDPART_OFS_APPEND
,
}
}
};
};
static
struct
mtd_partition
*
parsed_parts
;
static
struct
mtd_partition
*
parsed_parts
;
static
struct
mtd_info
*
flash_mtd
;
static
struct
mtd_info
*
flash_mtd
;
static
int
__init
init_flash
(
void
)
static
int
__init
init_flash
(
void
)
{
{
struct
mtd_partition
*
parts
;
struct
mtd_partition
*
parts
;
int
nb_parts
=
0
;
int
nb_parts
=
0
;
int
parsed_nr_parts
=
0
;
int
parsed_nr_parts
=
0
;
const
char
*
part_type
;
const
char
*
part_type
;
/*
/*
* Static partition definition selection
* Static partition definition selection
*/
*/
...
@@ -89,7 +89,7 @@ static int __init init_flash (void)
...
@@ -89,7 +89,7 @@ static int __init init_flash (void)
flash_mtd
=
do_map_probe
(
"jedec_probe"
,
&
omap_toto_map_flash
);
flash_mtd
=
do_map_probe
(
"jedec_probe"
,
&
omap_toto_map_flash
);
if
(
!
flash_mtd
)
if
(
!
flash_mtd
)
return
-
ENXIO
;
return
-
ENXIO
;
if
(
parsed_nr_parts
>
0
)
{
if
(
parsed_nr_parts
>
0
)
{
parts
=
parsed_parts
;
parts
=
parsed_parts
;
nb_parts
=
parsed_nr_parts
;
nb_parts
=
parsed_nr_parts
;
...
@@ -108,8 +108,8 @@ static int __init init_flash (void)
...
@@ -108,8 +108,8 @@ static int __init init_flash (void)
}
}
return
0
;
return
0
;
}
}
int
__init
omap_toto_mtd_init
(
void
)
int
__init
omap_toto_mtd_init
(
void
)
{
{
int
status
;
int
status
;
...
@@ -119,7 +119,7 @@ int __init omap_toto_mtd_init(void)
...
@@ -119,7 +119,7 @@ int __init omap_toto_mtd_init(void)
return
status
;
return
status
;
}
}
static
void
__exit
omap_toto_mtd_cleanup
(
void
)
static
void
__exit
omap_toto_mtd_cleanup
(
void
)
{
{
if
(
flash_mtd
)
{
if
(
flash_mtd
)
{
del_mtd_partitions
(
flash_mtd
);
del_mtd_partitions
(
flash_mtd
);
...
...
drivers/mtd/maps/omap_nor.c
View file @
69f34c98
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (C) 2001-2002 MontaVista Software Inc.
* Copyright (C) 2001-2002 MontaVista Software Inc.
* Copyright (C) 2003-2004 Texas Instruments
* Copyright (C) 2003-2004 Texas Instruments
* Copyright (C) 2004 Nokia Corporation
* Copyright (C) 2004 Nokia Corporation
*
*
* Assembled using driver code copyright the companies above
* Assembled using driver code copyright the companies above
* and written by David Brownell, Jian Zhang <jzhang@ti.com>,
* and written by David Brownell, Jian Zhang <jzhang@ti.com>,
...
...
drivers/mtd/maps/pci.c
View file @
69f34c98
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
* it under the terms of the GNU General Public License version 2 as
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
*
*
* $Id: pci.c,v 1.1
0 2005/03/18 14:04:35
gleixner Exp $
* $Id: pci.c,v 1.1
3 2005/11/07 11:14:27
gleixner Exp $
*
*
* Generic PCI memory map driver. We support the following boards:
* Generic PCI memory map driver. We support the following boards:
* - Intel IQ80310 ATU.
* - Intel IQ80310 ATU.
* - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001
* - Intel EBSA285 (blank rom programming mode). Tested working 27/09/2001
...
@@ -38,7 +38,7 @@ struct map_pci_info {
...
@@ -38,7 +38,7 @@ struct map_pci_info {
void
(
*
exit
)(
struct
pci_dev
*
dev
,
struct
map_pci_info
*
map
);
void
(
*
exit
)(
struct
pci_dev
*
dev
,
struct
map_pci_info
*
map
);
unsigned
long
(
*
translate
)(
struct
map_pci_info
*
map
,
unsigned
long
ofs
);
unsigned
long
(
*
translate
)(
struct
map_pci_info
*
map
,
unsigned
long
ofs
);
struct
pci_dev
*
dev
;
struct
pci_dev
*
dev
;
};
};
static
map_word
mtd_pci_read8
(
struct
map_info
*
_map
,
unsigned
long
ofs
)
static
map_word
mtd_pci_read8
(
struct
map_info
*
_map
,
unsigned
long
ofs
)
{
{
...
...
drivers/mtd/maps/pcmciamtd.c
View file @
69f34c98
/*
/*
* $Id: pcmciamtd.c,v 1.5
1 2004/07/12 22:38:29 dwmw2
Exp $
* $Id: pcmciamtd.c,v 1.5
5 2005/11/07 11:14:28 gleixner
Exp $
*
*
* pcmciamtd.c - MTD driver for PCMCIA flash memory cards
* pcmciamtd.c - MTD driver for PCMCIA flash memory cards
*
*
...
@@ -48,7 +48,7 @@ static const int debug = 0;
...
@@ -48,7 +48,7 @@ static const int debug = 0;
#define DRIVER_DESC "PCMCIA Flash memory card driver"
#define DRIVER_DESC "PCMCIA Flash memory card driver"
#define DRIVER_VERSION "$Revision: 1.5
1
$"
#define DRIVER_VERSION "$Revision: 1.5
5
$"
/* Size of the PCMCIA address space: 26 bits = 64 MB */
/* Size of the PCMCIA address space: 26 bits = 64 MB */
#define MAX_PCMCIA_ADDR 0x4000000
#define MAX_PCMCIA_ADDR 0x4000000
...
@@ -176,7 +176,7 @@ static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long
...
@@ -176,7 +176,7 @@ static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long
if
(
toread
>
len
)
if
(
toread
>
len
)
toread
=
len
;
toread
=
len
;
addr
=
remap_window
(
map
,
from
);
addr
=
remap_window
(
map
,
from
);
if
(
!
addr
)
if
(
!
addr
)
return
;
return
;
...
@@ -386,7 +386,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -386,7 +386,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
cs_error
(
link
->
handle
,
ParseTuple
,
rc
);
cs_error
(
link
->
handle
,
ParseTuple
,
rc
);
break
;
break
;
}
}
switch
(
tuple
.
TupleCode
)
{
switch
(
tuple
.
TupleCode
)
{
case
CISTPL_FORMAT
:
{
case
CISTPL_FORMAT
:
{
cistpl_format_t
*
t
=
&
parse
.
format
;
cistpl_format_t
*
t
=
&
parse
.
format
;
...
@@ -394,9 +394,9 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -394,9 +394,9 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
DEBUG
(
2
,
"Format type: %u, Error Detection: %u, offset = %u, length =%u"
,
DEBUG
(
2
,
"Format type: %u, Error Detection: %u, offset = %u, length =%u"
,
t
->
type
,
t
->
edc
,
t
->
offset
,
t
->
length
);
t
->
type
,
t
->
edc
,
t
->
offset
,
t
->
length
);
break
;
break
;
}
}
case
CISTPL_DEVICE
:
{
case
CISTPL_DEVICE
:
{
cistpl_device_t
*
t
=
&
parse
.
device
;
cistpl_device_t
*
t
=
&
parse
.
device
;
int
i
;
int
i
;
...
@@ -410,7 +410,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -410,7 +410,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
}
}
break
;
break
;
}
}
case
CISTPL_VERS_1
:
{
case
CISTPL_VERS_1
:
{
cistpl_vers_1_t
*
t
=
&
parse
.
version_1
;
cistpl_vers_1_t
*
t
=
&
parse
.
version_1
;
int
i
;
int
i
;
...
@@ -425,7 +425,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -425,7 +425,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
DEBUG
(
2
,
"Found name: %s"
,
dev
->
mtd_name
);
DEBUG
(
2
,
"Found name: %s"
,
dev
->
mtd_name
);
break
;
break
;
}
}
case
CISTPL_JEDEC_C
:
{
case
CISTPL_JEDEC_C
:
{
cistpl_jedec_t
*
t
=
&
parse
.
jedec
;
cistpl_jedec_t
*
t
=
&
parse
.
jedec
;
int
i
;
int
i
;
...
@@ -434,7 +434,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -434,7 +434,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
}
}
break
;
break
;
}
}
case
CISTPL_DEVICE_GEO
:
{
case
CISTPL_DEVICE_GEO
:
{
cistpl_device_geo_t
*
t
=
&
parse
.
device_geo
;
cistpl_device_geo_t
*
t
=
&
parse
.
device_geo
;
int
i
;
int
i
;
...
@@ -449,11 +449,11 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -449,11 +449,11 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
}
}
break
;
break
;
}
}
default:
default:
DEBUG
(
2
,
"Unknown tuple code %d"
,
tuple
.
TupleCode
);
DEBUG
(
2
,
"Unknown tuple code %d"
,
tuple
.
TupleCode
);
}
}
rc
=
pcmcia_get_next_tuple
(
link
->
handle
,
&
tuple
);
rc
=
pcmcia_get_next_tuple
(
link
->
handle
,
&
tuple
);
}
}
if
(
!
dev
->
pcmcia_map
.
size
)
if
(
!
dev
->
pcmcia_map
.
size
)
...
@@ -470,7 +470,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
...
@@ -470,7 +470,7 @@ static void card_settings(struct pcmciamtd_dev *dev, dev_link_t *link, int *new_
if
(
bankwidth
)
{
if
(
bankwidth
)
{
dev
->
pcmcia_map
.
bankwidth
=
bankwidth
;
dev
->
pcmcia_map
.
bankwidth
=
bankwidth
;
DEBUG
(
2
,
"bankwidth forced to %d"
,
bankwidth
);
DEBUG
(
2
,
"bankwidth forced to %d"
,
bankwidth
);
}
}
dev
->
pcmcia_map
.
name
=
dev
->
mtd_name
;
dev
->
pcmcia_map
.
name
=
dev
->
mtd_name
;
if
(
!
dev
->
mtd_name
[
0
])
{
if
(
!
dev
->
mtd_name
[
0
])
{
...
@@ -568,7 +568,7 @@ static void pcmciamtd_config(dev_link_t *link)
...
@@ -568,7 +568,7 @@ static void pcmciamtd_config(dev_link_t *link)
return
;
return
;
}
}
DEBUG
(
1
,
"Allocated a window of %dKiB"
,
dev
->
win_size
>>
10
);
DEBUG
(
1
,
"Allocated a window of %dKiB"
,
dev
->
win_size
>>
10
);
/* Get write protect status */
/* Get write protect status */
CS_CHECK
(
GetStatus
,
pcmcia_get_status
(
link
->
handle
,
&
status
));
CS_CHECK
(
GetStatus
,
pcmcia_get_status
(
link
->
handle
,
&
status
));
DEBUG
(
2
,
"status value: 0x%x window handle = 0x%8.8lx"
,
DEBUG
(
2
,
"status value: 0x%x window handle = 0x%8.8lx"
,
...
@@ -624,11 +624,11 @@ static void pcmciamtd_config(dev_link_t *link)
...
@@ -624,11 +624,11 @@ static void pcmciamtd_config(dev_link_t *link)
mtd
=
do_map_probe
(
probes
[
i
],
&
dev
->
pcmcia_map
);
mtd
=
do_map_probe
(
probes
[
i
],
&
dev
->
pcmcia_map
);
if
(
mtd
)
if
(
mtd
)
break
;
break
;
DEBUG
(
1
,
"FAILED: %s"
,
probes
[
i
]);
DEBUG
(
1
,
"FAILED: %s"
,
probes
[
i
]);
}
}
}
}
if
(
!
mtd
)
{
if
(
!
mtd
)
{
DEBUG
(
1
,
"Cant find an MTD"
);
DEBUG
(
1
,
"Cant find an MTD"
);
pcmciamtd_release
(
link
);
pcmciamtd_release
(
link
);
...
...
drivers/mtd/maps/physmap.c
View file @
69f34c98
/*
/*
* $Id: physmap.c,v 1.3
7 2004/11/28 09:40:40 dwmw2
Exp $
* $Id: physmap.c,v 1.3
8 2005/11/07 11:14:28 gleixner
Exp $
*
*
* Normal mappings of chips in physical memory
* Normal mappings of chips in physical memory
*
*
...
@@ -69,7 +69,7 @@ static int __init init_physmap(void)
...
@@ -69,7 +69,7 @@ static int __init init_physmap(void)
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
mtd_parts_nb
=
parse_mtd_partitions
(
mymtd
,
part_probes
,
mtd_parts_nb
=
parse_mtd_partitions
(
mymtd
,
part_probes
,
&
mtd_parts
,
0
);
&
mtd_parts
,
0
);
if
(
mtd_parts_nb
>
0
)
if
(
mtd_parts_nb
>
0
)
...
@@ -78,9 +78,9 @@ static int __init init_physmap(void)
...
@@ -78,9 +78,9 @@ static int __init init_physmap(void)
return
0
;
return
0
;
}
}
if
(
num_physmap_partitions
!=
0
)
if
(
num_physmap_partitions
!=
0
)
{
{
printk
(
KERN_NOTICE
printk
(
KERN_NOTICE
"Using physmap partition definition
\n
"
);
"Using physmap partition definition
\n
"
);
add_mtd_partitions
(
mymtd
,
physmap_partitions
,
num_physmap_partitions
);
add_mtd_partitions
(
mymtd
,
physmap_partitions
,
num_physmap_partitions
);
return
0
;
return
0
;
...
...
drivers/mtd/maps/plat-ram.c
View file @
69f34c98
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Generic platfrom device based RAM map
* Generic platfrom device based RAM map
*
*
* $Id: plat-ram.c,v 1.
6 2005/11/07 00:52:24
gleixner Exp $
* $Id: plat-ram.c,v 1.
7 2005/11/07 11:14:28
gleixner Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -91,7 +91,7 @@ static int platram_remove(struct device *dev)
...
@@ -91,7 +91,7 @@ static int platram_remove(struct device *dev)
dev_dbg
(
dev
,
"removing device
\n
"
);
dev_dbg
(
dev
,
"removing device
\n
"
);
if
(
info
==
NULL
)
if
(
info
==
NULL
)
return
0
;
return
0
;
if
(
info
->
mtd
)
{
if
(
info
->
mtd
)
{
...
@@ -118,7 +118,7 @@ static int platram_remove(struct device *dev)
...
@@ -118,7 +118,7 @@ static int platram_remove(struct device *dev)
if
(
info
->
map
.
virt
!=
NULL
)
if
(
info
->
map
.
virt
!=
NULL
)
iounmap
(
info
->
map
.
virt
);
iounmap
(
info
->
map
.
virt
);
kfree
(
info
);
kfree
(
info
);
return
0
;
return
0
;
...
@@ -139,7 +139,7 @@ static int platram_probe(struct device *dev)
...
@@ -139,7 +139,7 @@ static int platram_probe(struct device *dev)
int
err
=
0
;
int
err
=
0
;
dev_dbg
(
dev
,
"probe entered
\n
"
);
dev_dbg
(
dev
,
"probe entered
\n
"
);
if
(
dev
->
platform_data
==
NULL
)
{
if
(
dev
->
platform_data
==
NULL
)
{
dev_err
(
dev
,
"no platform data supplied
\n
"
);
dev_err
(
dev
,
"no platform data supplied
\n
"
);
err
=
-
ENOENT
;
err
=
-
ENOENT
;
...
@@ -240,7 +240,7 @@ static int platram_probe(struct device *dev)
...
@@ -240,7 +240,7 @@ static int platram_probe(struct device *dev)
dev_err
(
dev
,
"add_mtd_device() failed
\n
"
);
dev_err
(
dev
,
"add_mtd_device() failed
\n
"
);
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
}
}
dev_info
(
dev
,
"registered mtd device
\n
"
);
dev_info
(
dev
,
"registered mtd device
\n
"
);
return
err
;
return
err
;
...
...
drivers/mtd/maps/pnc2000.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* This code is GPL
* This code is GPL
*
*
* $Id: pnc2000.c,v 1.1
7 2004/11/16 18:29:02 dwmw2
Exp $
* $Id: pnc2000.c,v 1.1
8 2005/11/07 11:14:28 gleixner
Exp $
*/
*/
#include <linux/module.h>
#include <linux/module.h>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#define WINDOW_ADDR 0xbf000000
#define WINDOW_ADDR 0xbf000000
#define WINDOW_SIZE 0x00400000
#define WINDOW_SIZE 0x00400000
/*
/*
* MAP DRIVER STUFF
* MAP DRIVER STUFF
*/
*/
...
@@ -36,7 +36,7 @@ static struct map_info pnc_map = {
...
@@ -36,7 +36,7 @@ static struct map_info pnc_map = {
/*
/*
* MTD 'PARTITIONING' STUFF
* MTD 'PARTITIONING' STUFF
*/
*/
static
struct
mtd_partition
pnc_partitions
[
3
]
=
{
static
struct
mtd_partition
pnc_partitions
[
3
]
=
{
{
{
...
@@ -56,7 +56,7 @@ static struct mtd_partition pnc_partitions[3] = {
...
@@ -56,7 +56,7 @@ static struct mtd_partition pnc_partitions[3] = {
}
}
};
};
/*
/*
* This is the master MTD device for which all the others are just
* This is the master MTD device for which all the others are just
* auto-relocating aliases.
* auto-relocating aliases.
*/
*/
...
...
drivers/mtd/maps/pq2fads.c
View file @
69f34c98
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include <linux/mtd/physmap.h>
#include <linux/mtd/physmap.h>
/*
/*
NOTE: bank width and interleave relative to the installed flash
NOTE: bank width and interleave relative to the installed flash
should have been chosen within MTD_CFI_GEOMETRY options.
should have been chosen within MTD_CFI_GEOMETRY options.
*/
*/
#define PQ2FADS_BANK_WIDTH 4
#define PQ2FADS_BANK_WIDTH 4
...
@@ -35,7 +35,7 @@ static struct mtd_partition pq2fads_partitions[] = {
...
@@ -35,7 +35,7 @@ static struct mtd_partition pq2fads_partitions[] = {
.
size
=
0x40000
,
.
size
=
0x40000
,
.
offset
=
0
,
.
offset
=
0
,
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
},
{
},
{
.
name
=
"User FS"
,
.
name
=
"User FS"
,
.
size
=
0x5c0000
,
.
size
=
0x5c0000
,
.
offset
=
0x40000
,
.
offset
=
0x40000
,
...
@@ -44,17 +44,17 @@ static struct mtd_partition pq2fads_partitions[] = {
...
@@ -44,17 +44,17 @@ static struct mtd_partition pq2fads_partitions[] = {
.
size
=
0x600000
,
.
size
=
0x600000
,
.
offset
=
0
,
.
offset
=
0
,
#endif
#endif
},
{
},
{
.
name
=
"uImage"
,
.
name
=
"uImage"
,
.
size
=
0x100000
,
.
size
=
0x100000
,
.
offset
=
0x600000
,
.
offset
=
0x600000
,
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
},
{
},
{
.
name
=
"bootloader"
,
.
name
=
"bootloader"
,
.
size
=
0x40000
,
.
size
=
0x40000
,
.
offset
=
0x700000
,
.
offset
=
0x700000
,
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
},
{
},
{
.
name
=
"bootloader env"
,
.
name
=
"bootloader env"
,
.
size
=
0x40000
,
.
size
=
0x40000
,
.
offset
=
0x740000
,
.
offset
=
0x740000
,
...
@@ -80,9 +80,9 @@ static int __init init_pq2fads_mtd(void)
...
@@ -80,9 +80,9 @@ static int __init init_pq2fads_mtd(void)
static
void
__exit
cleanup_pq2fads_mtd
(
void
)
static
void
__exit
cleanup_pq2fads_mtd
(
void
)
{
{
}
}
module_init
(
init_pq2fads_mtd
);
module_init
(
init_pq2fads_mtd
);
module_exit
(
cleanup_pq2fads_mtd
);
module_exit
(
cleanup_pq2fads_mtd
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_DESCRIPTION
(
"MTD map and partitions for MPC8272ADS boards"
);
MODULE_DESCRIPTION
(
"MTD map and partitions for MPC8272ADS boards"
);
drivers/mtd/maps/redwood.c
View file @
69f34c98
/*
/*
* $Id: redwood.c,v 1.1
0 2004/11/04 13:24:15
gleixner Exp $
* $Id: redwood.c,v 1.1
1 2005/11/07 11:14:28
gleixner Exp $
*
*
* drivers/mtd/maps/redwood.c
* drivers/mtd/maps/redwood.c
*
*
...
@@ -79,7 +79,7 @@ static struct mtd_partition redwood_flash_partitions[] = {
...
@@ -79,7 +79,7 @@ static struct mtd_partition redwood_flash_partitions[] = {
#define RW_PART0_OF 0
#define RW_PART0_OF 0
#define RW_PART0_SZ 0x400000
/* 4 MiB data */
#define RW_PART0_SZ 0x400000
/* 4 MiB data */
#define RW_PART1_OF RW_PART0_OF + RW_PART0_SZ
#define RW_PART1_OF RW_PART0_OF + RW_PART0_SZ
#define RW_PART1_SZ 0x10000
/* 64K VPD */
#define RW_PART1_SZ 0x10000
/* 64K VPD */
#define RW_PART2_OF RW_PART1_OF + RW_PART1_SZ
#define RW_PART2_OF RW_PART1_OF + RW_PART1_SZ
#define RW_PART2_SZ 0x400000 - (0x10000 + 0x20000)
#define RW_PART2_SZ 0x400000 - (0x10000 + 0x20000)
...
...
drivers/mtd/maps/sa1100-flash.c
View file @
69f34c98
/*
/*
* Flash memory access on SA11x0 based devices
* Flash memory access on SA11x0 based devices
*
*
* (C) 2000 Nicolas Pitre <nico@cam.org>
* (C) 2000 Nicolas Pitre <nico@cam.org>
*
*
* $Id: sa1100-flash.c,v 1.
47 2004/11/01 13:44:36 rmk
Exp $
* $Id: sa1100-flash.c,v 1.
51 2005/11/07 11:14:28 gleixner
Exp $
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
...
...
drivers/mtd/maps/sbc8240.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* This code is GPLed
* This code is GPLed
*
*
* $Id: sbc8240.c,v 1.
4 2004/07/12 22:38:29 dwmw2
Exp $
* $Id: sbc8240.c,v 1.
5 2005/11/07 11:14:28 gleixner
Exp $
*
*
*/
*/
...
@@ -205,7 +205,7 @@ int __init init_sbc8240_mtd (void)
...
@@ -205,7 +205,7 @@ int __init init_sbc8240_mtd (void)
}
else
{
}
else
{
printk
(
KERN_NOTICE
MSG_PREFIX
printk
(
KERN_NOTICE
MSG_PREFIX
"Using %s partition definition
\n
"
,
sbc8240_part_banks
[
i
].
mtd_part
->
name
);
"Using %s partition definition
\n
"
,
sbc8240_part_banks
[
i
].
mtd_part
->
name
);
add_mtd_partitions
(
sbc8240_mtd
[
i
],
add_mtd_partitions
(
sbc8240_mtd
[
i
],
sbc8240_part_banks
[
i
].
mtd_part
,
sbc8240_part_banks
[
i
].
mtd_part
,
sbc8240_part_banks
[
i
].
nums
);
sbc8240_part_banks
[
i
].
nums
);
}
}
...
...
drivers/mtd/maps/sbc_gxx.c
View file @
69f34c98
/* sbc_gxx.c -- MTD map driver for Arcom Control Systems SBC-MediaGX,
/* sbc_gxx.c -- MTD map driver for Arcom Control Systems SBC-MediaGX,
SBC-GXm and SBC-GX1 series boards.
SBC-GXm and SBC-GX1 series boards.
Copyright (C) 2001 Arcom Control System Ltd
Copyright (C) 2001 Arcom Control System Ltd
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
$Id: sbc_gxx.c,v 1.3
3 2004/11/28 09:40:40 dwmw2
Exp $
$Id: sbc_gxx.c,v 1.3
5 2005/11/07 11:14:28 gleixner
Exp $
The SBC-MediaGX / SBC-GXx has up to 16 MiB of
The SBC-MediaGX / SBC-GXx has up to 16 MiB of
Intel StrataFlash (28F320/28F640) in x8 mode.
Intel StrataFlash (28F320/28F640) in x8 mode.
This driver uses the CFI probe and Intel Extended Command Set drivers.
This driver uses the CFI probe and Intel Extended Command Set drivers.
The flash is accessed as follows:
The flash is accessed as follows:
16 KiB memory window at 0xdc000-0xdffff
16 KiB memory window at 0xdc000-0xdffff
Two IO address locations for paging
Two IO address locations for paging
0x258
0x258
bit 0-7: address bit 14-21
bit 0-7: address bit 14-21
0x259
0x259
...
@@ -37,7 +37,7 @@ The flash is accessed as follows:
...
@@ -37,7 +37,7 @@ The flash is accessed as follows:
bit 7: 0 - reset/powered down
bit 7: 0 - reset/powered down
1 - device enabled
1 - device enabled
The single flash device is divided into 3 partition which appear as
The single flash device is divided into 3 partition which appear as
separate MTD devices.
separate MTD devices.
25/04/2001 AJL (Arcom) Modified signon strings and partition sizes
25/04/2001 AJL (Arcom) Modified signon strings and partition sizes
...
@@ -87,17 +87,17 @@ static volatile int page_in_window = -1; // Current page in window.
...
@@ -87,17 +87,17 @@ static volatile int page_in_window = -1; // Current page in window.
static
void
__iomem
*
iomapadr
;
static
void
__iomem
*
iomapadr
;
static
DEFINE_SPINLOCK
(
sbc_gxx_spin
);
static
DEFINE_SPINLOCK
(
sbc_gxx_spin
);
/* partition_info gives details on the logical partitions that the split the
/* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the
* single flash device into. If the size if zero we use up to the end of the
* device. */
* device. */
static
struct
mtd_partition
partition_info
[]
=
{
static
struct
mtd_partition
partition_info
[]
=
{
{
.
name
=
"SBC-GXx flash boot partition"
,
{
.
name
=
"SBC-GXx flash boot partition"
,
.
offset
=
0
,
.
offset
=
0
,
.
size
=
BOOT_PARTITION_SIZE_KiB
*
1024
},
.
size
=
BOOT_PARTITION_SIZE_KiB
*
1024
},
{
.
name
=
"SBC-GXx flash data partition"
,
{
.
name
=
"SBC-GXx flash data partition"
,
.
offset
=
BOOT_PARTITION_SIZE_KiB
*
1024
,
.
offset
=
BOOT_PARTITION_SIZE_KiB
*
1024
,
.
size
=
(
DATA_PARTITION_SIZE_KiB
)
*
1024
},
.
size
=
(
DATA_PARTITION_SIZE_KiB
)
*
1024
},
{
.
name
=
"SBC-GXx flash application partition"
,
{
.
name
=
"SBC-GXx flash application partition"
,
.
offset
=
(
BOOT_PARTITION_SIZE_KiB
+
DATA_PARTITION_SIZE_KiB
)
*
1024
}
.
offset
=
(
BOOT_PARTITION_SIZE_KiB
+
DATA_PARTITION_SIZE_KiB
)
*
1024
}
};
};
...
@@ -130,7 +130,7 @@ static void sbc_gxx_copy_from(struct map_info *map, void *to, unsigned long from
...
@@ -130,7 +130,7 @@ static void sbc_gxx_copy_from(struct map_info *map, void *to, unsigned long from
unsigned
long
thislen
=
len
;
unsigned
long
thislen
=
len
;
if
(
len
>
(
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
)))
if
(
len
>
(
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
)))
thislen
=
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
);
thislen
=
WINDOW_LENGTH
-
(
from
&
WINDOW_MASK
);
spin_lock
(
&
sbc_gxx_spin
);
spin_lock
(
&
sbc_gxx_spin
);
sbc_gxx_page
(
map
,
from
);
sbc_gxx_page
(
map
,
from
);
memcpy_fromio
(
to
,
iomapadr
+
(
from
&
WINDOW_MASK
),
thislen
);
memcpy_fromio
(
to
,
iomapadr
+
(
from
&
WINDOW_MASK
),
thislen
);
...
@@ -150,12 +150,12 @@ static void sbc_gxx_write8(struct map_info *map, map_word d, unsigned long adr)
...
@@ -150,12 +150,12 @@ static void sbc_gxx_write8(struct map_info *map, map_word d, unsigned long adr)
}
}
static
void
sbc_gxx_copy_to
(
struct
map_info
*
map
,
unsigned
long
to
,
const
void
*
from
,
ssize_t
len
)
static
void
sbc_gxx_copy_to
(
struct
map_info
*
map
,
unsigned
long
to
,
const
void
*
from
,
ssize_t
len
)
{
{
while
(
len
)
{
while
(
len
)
{
unsigned
long
thislen
=
len
;
unsigned
long
thislen
=
len
;
if
(
len
>
(
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
)))
if
(
len
>
(
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
)))
thislen
=
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
);
thislen
=
WINDOW_LENGTH
-
(
to
&
WINDOW_MASK
);
spin_lock
(
&
sbc_gxx_spin
);
spin_lock
(
&
sbc_gxx_spin
);
sbc_gxx_page
(
map
,
to
);
sbc_gxx_page
(
map
,
to
);
memcpy_toio
(
iomapadr
+
(
to
&
WINDOW_MASK
),
from
,
thislen
);
memcpy_toio
(
iomapadr
+
(
to
&
WINDOW_MASK
),
from
,
thislen
);
...
@@ -201,7 +201,7 @@ static int __init init_sbc_gxx(void)
...
@@ -201,7 +201,7 @@ static int __init init_sbc_gxx(void)
sbc_gxx_map
.
name
);
sbc_gxx_map
.
name
);
return
-
EIO
;
return
-
EIO
;
}
}
if
(
!
request_region
(
PAGE_IO
,
PAGE_IO_SIZE
,
"SBC-GXx flash"
))
{
if
(
!
request_region
(
PAGE_IO
,
PAGE_IO_SIZE
,
"SBC-GXx flash"
))
{
printk
(
KERN_ERR
"%s: IO ports 0x%x-0x%x in use
\n
"
,
printk
(
KERN_ERR
"%s: IO ports 0x%x-0x%x in use
\n
"
,
sbc_gxx_map
.
name
,
sbc_gxx_map
.
name
,
...
@@ -209,8 +209,8 @@ static int __init init_sbc_gxx(void)
...
@@ -209,8 +209,8 @@ static int __init init_sbc_gxx(void)
iounmap
(
iomapadr
);
iounmap
(
iomapadr
);
return
-
EAGAIN
;
return
-
EAGAIN
;
}
}
printk
(
KERN_INFO
"%s: IO:0x%x-0x%x MEM:0x%x-0x%x
\n
"
,
printk
(
KERN_INFO
"%s: IO:0x%x-0x%x MEM:0x%x-0x%x
\n
"
,
sbc_gxx_map
.
name
,
sbc_gxx_map
.
name
,
PAGE_IO
,
PAGE_IO
+
PAGE_IO_SIZE
-
1
,
PAGE_IO
,
PAGE_IO
+
PAGE_IO_SIZE
-
1
,
...
@@ -222,7 +222,7 @@ static int __init init_sbc_gxx(void)
...
@@ -222,7 +222,7 @@ static int __init init_sbc_gxx(void)
cleanup_sbc_gxx
();
cleanup_sbc_gxx
();
return
-
ENXIO
;
return
-
ENXIO
;
}
}
all_mtd
->
owner
=
THIS_MODULE
;
all_mtd
->
owner
=
THIS_MODULE
;
/* Create MTD devices for each partition. */
/* Create MTD devices for each partition. */
...
...
drivers/mtd/maps/sc520cdp.c
View file @
69f34c98
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
*
* $Id: sc520cdp.c,v 1.2
1 2004/12/13 10:27:08 dedekind
Exp $
* $Id: sc520cdp.c,v 1.2
2 2005/11/07 11:14:28 gleixner
Exp $
*
*
*
*
* The SC520CDP is an evaluation board for the Elan SC520 processor available
* The SC520CDP is an evaluation board for the Elan SC520 processor available
...
@@ -231,7 +231,7 @@ static void sc520cdp_setup_par(void)
...
@@ -231,7 +231,7 @@ static void sc520cdp_setup_par(void)
static
int
__init
init_sc520cdp
(
void
)
static
int
__init
init_sc520cdp
(
void
)
{
{
int
i
,
devices_found
=
0
;
int
i
,
devices_found
=
0
;
#ifdef REPROGRAM_PAR
#ifdef REPROGRAM_PAR
/* reprogram PAR registers so flash appears at the desired addresses */
/* reprogram PAR registers so flash appears at the desired addresses */
sc520cdp_setup_par
();
sc520cdp_setup_par
();
...
@@ -278,7 +278,7 @@ static int __init init_sc520cdp(void)
...
@@ -278,7 +278,7 @@ static int __init init_sc520cdp(void)
static
void
__exit
cleanup_sc520cdp
(
void
)
static
void
__exit
cleanup_sc520cdp
(
void
)
{
{
int
i
;
int
i
;
if
(
merged_mtd
)
{
if
(
merged_mtd
)
{
del_mtd_device
(
merged_mtd
);
del_mtd_device
(
merged_mtd
);
mtd_concat_destroy
(
merged_mtd
);
mtd_concat_destroy
(
merged_mtd
);
...
...
drivers/mtd/maps/scx200_docflash.c
View file @
69f34c98
/* linux/drivers/mtd/maps/scx200_docflash.c
/* linux/drivers/mtd/maps/scx200_docflash.c
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
$Id: scx200_docflash.c,v 1.1
0 2004/11/28 09:40:40 dwmw2 Exp $
$Id: scx200_docflash.c,v 1.1
2 2005/11/07 11:14:28 gleixner Exp $
National Semiconductor SCx200 flash mapped with DOCCS
National Semiconductor SCx200 flash mapped with DOCCS
*/
*/
...
@@ -49,23 +49,23 @@ static struct mtd_info *mymtd;
...
@@ -49,23 +49,23 @@ static struct mtd_info *mymtd;
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_PARTITIONS
static
struct
mtd_partition
partition_info
[]
=
{
static
struct
mtd_partition
partition_info
[]
=
{
{
{
.
name
=
"DOCCS Boot kernel"
,
.
name
=
"DOCCS Boot kernel"
,
.
offset
=
0
,
.
offset
=
0
,
.
size
=
0xc0000
.
size
=
0xc0000
},
},
{
{
.
name
=
"DOCCS Low BIOS"
,
.
name
=
"DOCCS Low BIOS"
,
.
offset
=
0xc0000
,
.
offset
=
0xc0000
,
.
size
=
0x40000
.
size
=
0x40000
},
},
{
{
.
name
=
"DOCCS File system"
,
.
name
=
"DOCCS File system"
,
.
offset
=
0x100000
,
.
offset
=
0x100000
,
.
size
=
~
0
/* calculate from flash size */
.
size
=
~
0
/* calculate from flash size */
},
},
{
{
.
name
=
"DOCCS High BIOS"
,
.
name
=
"DOCCS High BIOS"
,
.
offset
=
~
0
,
/* calculate from flash size */
.
offset
=
~
0
,
/* calculate from flash size */
.
size
=
0x80000
.
size
=
0x80000
},
},
...
@@ -88,7 +88,7 @@ static int __init init_scx200_docflash(void)
...
@@ -88,7 +88,7 @@ static int __init init_scx200_docflash(void)
printk
(
KERN_DEBUG
NAME
": NatSemi SCx200 DOCCS Flash Driver
\n
"
);
printk
(
KERN_DEBUG
NAME
": NatSemi SCx200 DOCCS Flash Driver
\n
"
);
if
((
bridge
=
pci_find_device
(
PCI_VENDOR_ID_NS
,
if
((
bridge
=
pci_find_device
(
PCI_VENDOR_ID_NS
,
PCI_DEVICE_ID_NS_SCx200_BRIDGE
,
PCI_DEVICE_ID_NS_SCx200_BRIDGE
,
NULL
))
==
NULL
)
NULL
))
==
NULL
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -134,28 +134,28 @@ static int __init init_scx200_docflash(void)
...
@@ -134,28 +134,28 @@ static int __init init_scx200_docflash(void)
printk
(
KERN_ERR
NAME
": invalid size for flash mapping
\n
"
);
printk
(
KERN_ERR
NAME
": invalid size for flash mapping
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
width
!=
8
&&
width
!=
16
)
{
if
(
width
!=
8
&&
width
!=
16
)
{
printk
(
KERN_ERR
NAME
": invalid bus width for flash mapping
\n
"
);
printk
(
KERN_ERR
NAME
": invalid bus width for flash mapping
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
allocate_resource
(
&
iomem_resource
,
&
docmem
,
if
(
allocate_resource
(
&
iomem_resource
,
&
docmem
,
size
,
size
,
0xc0000000
,
0xffffffff
,
0xc0000000
,
0xffffffff
,
size
,
NULL
,
NULL
))
{
size
,
NULL
,
NULL
))
{
printk
(
KERN_ERR
NAME
": unable to allocate memory for flash mapping
\n
"
);
printk
(
KERN_ERR
NAME
": unable to allocate memory for flash mapping
\n
"
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
ctrl
=
0x07000000
|
((
size
-
1
)
>>
13
);
ctrl
=
0x07000000
|
((
size
-
1
)
>>
13
);
printk
(
KERN_INFO
"DOCCS BASE=0x%08lx, CTRL=0x%08lx
\n
"
,
(
long
)
docmem
.
start
,
(
long
)
ctrl
);
printk
(
KERN_INFO
"DOCCS BASE=0x%08lx, CTRL=0x%08lx
\n
"
,
(
long
)
docmem
.
start
,
(
long
)
ctrl
);
pci_write_config_dword
(
bridge
,
SCx200_DOCCS_BASE
,
docmem
.
start
);
pci_write_config_dword
(
bridge
,
SCx200_DOCCS_BASE
,
docmem
.
start
);
pci_write_config_dword
(
bridge
,
SCx200_DOCCS_CTRL
,
ctrl
);
pci_write_config_dword
(
bridge
,
SCx200_DOCCS_CTRL
,
ctrl
);
pmr
=
inl
(
scx200_cb_base
+
SCx200_PMR
);
pmr
=
inl
(
scx200_cb_base
+
SCx200_PMR
);
if
(
width
==
8
)
{
if
(
width
==
8
)
{
pmr
&=
~
(
1
<<
6
);
pmr
&=
~
(
1
<<
6
);
}
else
{
}
else
{
...
@@ -163,8 +163,8 @@ static int __init init_scx200_docflash(void)
...
@@ -163,8 +163,8 @@ static int __init init_scx200_docflash(void)
}
}
outl
(
pmr
,
scx200_cb_base
+
SCx200_PMR
);
outl
(
pmr
,
scx200_cb_base
+
SCx200_PMR
);
}
}
printk
(
KERN_INFO
NAME
": DOCCS mapped at 0x%lx-0x%lx, width %d
\n
"
,
printk
(
KERN_INFO
NAME
": DOCCS mapped at 0x%lx-0x%lx, width %d
\n
"
,
docmem
.
start
,
docmem
.
end
,
width
);
docmem
.
start
,
docmem
.
end
,
width
);
scx200_docflash_map
.
size
=
size
;
scx200_docflash_map
.
size
=
size
;
...
...
drivers/mtd/maps/sharpsl-flash.c
View file @
69f34c98
/*
/*
* sharpsl-flash.c
* sharpsl-flash.c
*
*
* Copyright (C) 2001 Lineo Japan, Inc.
* Copyright (C) 2001 Lineo Japan, Inc.
* Copyright (C) 2002 SHARP
* Copyright (C) 2002 SHARP
*
*
* $Id: sharpsl-flash.c,v 1.
5 2005/03/21 08:42:11 rpurdie
Exp $
* $Id: sharpsl-flash.c,v 1.
7 2005/11/07 11:14:28 gleixner
Exp $
*
*
* based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp
* based on rpxlite.c,v 1.15 2001/10/02 15:05:14 dwmw2 Exp
* Handle mapping of the flash on the RPX Lite and CLLF boards
* Handle mapping of the flash on the RPX Lite and CLLF boards
...
@@ -57,7 +57,7 @@ int __init init_sharpsl(void)
...
@@ -57,7 +57,7 @@ int __init init_sharpsl(void)
int
nb_parts
=
0
;
int
nb_parts
=
0
;
char
*
part_type
=
"static"
;
char
*
part_type
=
"static"
;
printk
(
KERN_NOTICE
"Sharp SL series flash device: %x at %x
\n
"
,
printk
(
KERN_NOTICE
"Sharp SL series flash device: %x at %x
\n
"
,
WINDOW_SIZE
,
WINDOW_ADDR
);
WINDOW_SIZE
,
WINDOW_ADDR
);
sharpsl_map
.
virt
=
ioremap
(
WINDOW_ADDR
,
WINDOW_SIZE
);
sharpsl_map
.
virt
=
ioremap
(
WINDOW_ADDR
,
WINDOW_SIZE
);
if
(
!
sharpsl_map
.
virt
)
{
if
(
!
sharpsl_map
.
virt
)
{
...
@@ -75,7 +75,7 @@ int __init init_sharpsl(void)
...
@@ -75,7 +75,7 @@ int __init init_sharpsl(void)
mymtd
->
owner
=
THIS_MODULE
;
mymtd
->
owner
=
THIS_MODULE
;
if
(
machine_is_corgi
()
||
machine_is_shepherd
()
||
machine_is_husky
()
if
(
machine_is_corgi
()
||
machine_is_shepherd
()
||
machine_is_husky
()
||
machine_is_poodle
())
{
||
machine_is_poodle
())
{
sharpsl_partitions
[
0
].
size
=
0x006d0000
;
sharpsl_partitions
[
0
].
size
=
0x006d0000
;
sharpsl_partitions
[
0
].
offset
=
0x00120000
;
sharpsl_partitions
[
0
].
offset
=
0x00120000
;
...
@@ -87,10 +87,10 @@ int __init init_sharpsl(void)
...
@@ -87,10 +87,10 @@ int __init init_sharpsl(void)
sharpsl_partitions
[
0
].
offset
=
0x00140000
;
sharpsl_partitions
[
0
].
offset
=
0x00140000
;
}
else
{
}
else
{
map_destroy
(
mymtd
);
map_destroy
(
mymtd
);
iounmap
(
sharpsl_map
.
virt
);
iounmap
(
sharpsl_map
.
virt
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
parts
=
sharpsl_partitions
;
parts
=
sharpsl_partitions
;
nb_parts
=
NB_OF
(
sharpsl_partitions
);
nb_parts
=
NB_OF
(
sharpsl_partitions
);
...
...
drivers/mtd/maps/solutionengine.c
View file @
69f34c98
/*
/*
* $Id: solutionengine.c,v 1.1
4 2004/09/16 23:27:14
gleixner Exp $
* $Id: solutionengine.c,v 1.1
5 2005/11/07 11:14:28
gleixner Exp $
*
*
* Flash and EPROM on Hitachi Solution Engine and similar boards.
* Flash and EPROM on Hitachi Solution Engine and similar boards.
*
*
...
@@ -67,7 +67,7 @@ static int __init init_soleng_maps(void)
...
@@ -67,7 +67,7 @@ static int __init init_soleng_maps(void)
soleng_eprom_map
.
virt
=
(
void
__iomem
*
)
P1SEGADDR
(
0x01000000
);
soleng_eprom_map
.
virt
=
(
void
__iomem
*
)
P1SEGADDR
(
0x01000000
);
simple_map_init
(
&
soleng_eprom_map
);
simple_map_init
(
&
soleng_eprom_map
);
simple_map_init
(
&
soleng_flash_map
);
simple_map_init
(
&
soleng_flash_map
);
printk
(
KERN_NOTICE
"Probing for flash chips at 0x00000000:
\n
"
);
printk
(
KERN_NOTICE
"Probing for flash chips at 0x00000000:
\n
"
);
flash_mtd
=
do_map_probe
(
"cfi_probe"
,
&
soleng_flash_map
);
flash_mtd
=
do_map_probe
(
"cfi_probe"
,
&
soleng_flash_map
);
if
(
!
flash_mtd
)
{
if
(
!
flash_mtd
)
{
...
...
drivers/mtd/maps/sun_uflash.c
View file @
69f34c98
/* $Id: sun_uflash.c,v 1.1
1 2004/11/04 13:24:15
gleixner Exp $
/* $Id: sun_uflash.c,v 1.1
3 2005/11/07 11:14:28
gleixner Exp $
*
*
* sun_uflash - Driver implementation for user-programmable flash
* sun_uflash - Driver implementation for user-programmable flash
* present on many Sun Microsystems SME boardsets.
* present on many Sun Microsystems SME boardsets.
...
@@ -63,7 +63,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
...
@@ -63,7 +63,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
iTmp
=
prom_getproperty
(
iTmp
=
prom_getproperty
(
edev
->
prom_node
,
"reg"
,
(
void
*
)
regs
,
sizeof
(
regs
));
edev
->
prom_node
,
"reg"
,
(
void
*
)
regs
,
sizeof
(
regs
));
if
((
iTmp
%
sizeof
(
regs
[
0
]))
!=
0
)
{
if
((
iTmp
%
sizeof
(
regs
[
0
]))
!=
0
)
{
printk
(
"%s: Strange reg property size %d
\n
"
,
printk
(
"%s: Strange reg property size %d
\n
"
,
UFLASH_DEVNAME
,
iTmp
);
UFLASH_DEVNAME
,
iTmp
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -75,7 +75,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
...
@@ -75,7 +75,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
* can work on supporting it.
* can work on supporting it.
*/
*/
printk
(
"%s: unsupported device at 0x%lx (%d regs): "
\
printk
(
"%s: unsupported device at 0x%lx (%d regs): "
\
"email ebrower@usa.net
\n
"
,
"email ebrower@usa.net
\n
"
,
UFLASH_DEVNAME
,
edev
->
resource
[
0
].
start
,
nregs
);
UFLASH_DEVNAME
,
edev
->
resource
[
0
].
start
,
nregs
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -84,7 +84,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
...
@@ -84,7 +84,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
printk
(
"%s: unable to kmalloc new device
\n
"
,
UFLASH_DEVNAME
);
printk
(
"%s: unable to kmalloc new device
\n
"
,
UFLASH_DEVNAME
);
return
(
-
ENOMEM
);
return
(
-
ENOMEM
);
}
}
/* copy defaults and tweak parameters */
/* copy defaults and tweak parameters */
memcpy
(
&
pdev
->
map
,
&
uflash_map_templ
,
sizeof
(
uflash_map_templ
));
memcpy
(
&
pdev
->
map
,
&
uflash_map_templ
,
sizeof
(
uflash_map_templ
));
pdev
->
map
.
size
=
regs
[
0
].
reg_size
;
pdev
->
map
.
size
=
regs
[
0
].
reg_size
;
...
@@ -155,7 +155,7 @@ static void __exit uflash_cleanup(void)
...
@@ -155,7 +155,7 @@ static void __exit uflash_cleanup(void)
list_for_each
(
udevlist
,
&
device_list
)
{
list_for_each
(
udevlist
,
&
device_list
)
{
udev
=
list_entry
(
udevlist
,
struct
uflash_dev
,
list
);
udev
=
list_entry
(
udevlist
,
struct
uflash_dev
,
list
);
DEBUG
(
2
,
"%s: removing device %s
\n
"
,
DEBUG
(
2
,
"%s: removing device %s
\n
"
,
UFLASH_DEVNAME
,
udev
->
name
);
UFLASH_DEVNAME
,
udev
->
name
);
if
(
0
!=
udev
->
mtd
)
{
if
(
0
!=
udev
->
mtd
)
{
...
@@ -170,7 +170,7 @@ static void __exit uflash_cleanup(void)
...
@@ -170,7 +170,7 @@ static void __exit uflash_cleanup(void)
kfree
(
udev
->
name
);
kfree
(
udev
->
name
);
}
}
kfree
(
udev
);
kfree
(
udev
);
}
}
}
}
module_init
(
uflash_init
);
module_init
(
uflash_init
);
...
...
drivers/mtd/maps/tqm834x.c
View file @
69f34c98
...
@@ -133,7 +133,7 @@ static int __init init_tqm834x_mtd(void)
...
@@ -133,7 +133,7 @@ static int __init init_tqm834x_mtd(void)
pr_debug
(
"%s: chip probing count %d
\n
"
,
__FUNCTION__
,
idx
);
pr_debug
(
"%s: chip probing count %d
\n
"
,
__FUNCTION__
,
idx
);
map_banks
[
idx
]
=
map_banks
[
idx
]
=
(
struct
map_info
*
)
kmalloc
(
sizeof
(
struct
map_info
),
(
struct
map_info
*
)
kmalloc
(
sizeof
(
struct
map_info
),
GFP_KERNEL
);
GFP_KERNEL
);
if
(
map_banks
[
idx
]
==
NULL
)
{
if
(
map_banks
[
idx
]
==
NULL
)
{
...
@@ -193,7 +193,7 @@ static int __init init_tqm834x_mtd(void)
...
@@ -193,7 +193,7 @@ static int __init init_tqm834x_mtd(void)
tqm834x_partitions_bank1
[
n
-
1
].
size
=
tqm834x_partitions_bank1
[
n
-
1
].
size
=
mtd_banks
[
0
]
->
size
-
mtd_banks
[
0
]
->
size
-
tqm834x_partitions_bank1
[
n
-
1
].
offset
;
tqm834x_partitions_bank1
[
n
-
1
].
offset
;
/* check if we have second bank? */
/* check if we have second bank? */
if
(
num_banks
==
2
)
{
if
(
num_banks
==
2
)
{
n
=
ARRAY_SIZE
(
tqm834x_partitions_bank2
);
n
=
ARRAY_SIZE
(
tqm834x_partitions_bank2
);
...
@@ -227,11 +227,11 @@ static int __init init_tqm834x_mtd(void)
...
@@ -227,11 +227,11 @@ static int __init init_tqm834x_mtd(void)
"available, registering whole device
\n
"
,
idx
);
"available, registering whole device
\n
"
,
idx
);
add_mtd_device
(
mtd_banks
[
idx
]);
add_mtd_device
(
mtd_banks
[
idx
]);
}
else
{
}
else
{
printk
(
KERN_NOTICE
printk
(
KERN_NOTICE
"TQM834x flash bank %d: Using %s partition "
"TQM834x flash bank %d: Using %s partition "
"definition
\n
"
,
idx
,
part_banks
[
idx
].
type
);
"definition
\n
"
,
idx
,
part_banks
[
idx
].
type
);
add_mtd_partitions
(
mtd_banks
[
idx
],
add_mtd_partitions
(
mtd_banks
[
idx
],
part_banks
[
idx
].
mtd_part
,
part_banks
[
idx
].
mtd_part
,
part_banks
[
idx
].
nums
);
part_banks
[
idx
].
nums
);
}
}
}
}
...
...
drivers/mtd/maps/tqm8xxl.c
View file @
69f34c98
/*
/*
* Handle mapping of the flash memory access routines
* Handle mapping of the flash memory access routines
* on TQM8xxL based devices.
* on TQM8xxL based devices.
*
*
* $Id: tqm8xxl.c,v 1.1
3 2004/10/20 22:21:53 dwmw2
Exp $
* $Id: tqm8xxl.c,v 1.1
5 2005/11/07 11:14:28 gleixner
Exp $
*
*
* based on rpxlite.c
* based on rpxlite.c
*
*
* Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw>
* Copyright(C) 2001 Kirk Lee <kirk@hpc.ee.ntu.edu.tw>
*
*
* This code is GPLed
* This code is GPLed
*
*
*/
*/
/*
/*
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* 2MiB 512Kx16 2MiB 0
* 2MiB 512Kx16 2MiB 0
* 4MiB 1Mx16 4MiB 0
* 4MiB 1Mx16 4MiB 0
* 8MiB 1Mx16 4MiB 4MiB
* 8MiB 1Mx16 4MiB 4MiB
* Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
* Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
* kernel configuration.
* kernel configuration.
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -58,9 +58,9 @@ static void __iomem *start_scan_addr;
...
@@ -58,9 +58,9 @@ static void __iomem *start_scan_addr;
* Here are partition information for all known TQM8xxL series devices.
* Here are partition information for all known TQM8xxL series devices.
* See include/linux/mtd/partitions.h for definition of the mtd_partition
* See include/linux/mtd/partitions.h for definition of the mtd_partition
* structure.
* structure.
*
*
* The *_max_flash_size is the maximum possible mapped flash size which
* The *_max_flash_size is the maximum possible mapped flash size which
* is not necessarily the actual flash size. It must correspond to the
* is not necessarily the actual flash size. It must correspond to the
* value specified in the mapping definition defined by the
* value specified in the mapping definition defined by the
* "struct map_desc *_io_desc" for the corresponding machine.
* "struct map_desc *_io_desc" for the corresponding machine.
*/
*/
...
@@ -132,9 +132,9 @@ int __init init_tqm_mtd(void)
...
@@ -132,9 +132,9 @@ int __init init_tqm_mtd(void)
for
(
idx
=
0
;
idx
<
FLASH_BANK_MAX
;
idx
++
)
{
for
(
idx
=
0
;
idx
<
FLASH_BANK_MAX
;
idx
++
)
{
if
(
mtd_size
>=
flash_size
)
if
(
mtd_size
>=
flash_size
)
break
;
break
;
printk
(
KERN_INFO
"%s: chip probing count %d
\n
"
,
__FUNCTION__
,
idx
);
printk
(
KERN_INFO
"%s: chip probing count %d
\n
"
,
__FUNCTION__
,
idx
);
map_banks
[
idx
]
=
(
struct
map_info
*
)
kmalloc
(
sizeof
(
struct
map_info
),
GFP_KERNEL
);
map_banks
[
idx
]
=
(
struct
map_info
*
)
kmalloc
(
sizeof
(
struct
map_info
),
GFP_KERNEL
);
if
(
map_banks
[
idx
]
==
NULL
)
{
if
(
map_banks
[
idx
]
==
NULL
)
{
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
...
@@ -180,7 +180,7 @@ int __init init_tqm_mtd(void)
...
@@ -180,7 +180,7 @@ int __init init_tqm_mtd(void)
mtd_size
+=
mtd_banks
[
idx
]
->
size
;
mtd_size
+=
mtd_banks
[
idx
]
->
size
;
num_banks
++
;
num_banks
++
;
printk
(
KERN_INFO
"%s: bank%d, name:%s, size:%dbytes
\n
"
,
__FUNCTION__
,
num_banks
,
printk
(
KERN_INFO
"%s: bank%d, name:%s, size:%dbytes
\n
"
,
__FUNCTION__
,
num_banks
,
mtd_banks
[
idx
]
->
name
,
mtd_banks
[
idx
]
->
size
);
mtd_banks
[
idx
]
->
name
,
mtd_banks
[
idx
]
->
size
);
}
}
}
}
...
@@ -211,7 +211,7 @@ int __init init_tqm_mtd(void)
...
@@ -211,7 +211,7 @@ int __init init_tqm_mtd(void)
}
else
{
}
else
{
printk
(
KERN_NOTICE
"TQM flash%d: Using %s partition definition
\n
"
,
printk
(
KERN_NOTICE
"TQM flash%d: Using %s partition definition
\n
"
,
idx
,
part_banks
[
idx
].
type
);
idx
,
part_banks
[
idx
].
type
);
add_mtd_partitions
(
mtd_banks
[
idx
],
part_banks
[
idx
].
mtd_part
,
add_mtd_partitions
(
mtd_banks
[
idx
],
part_banks
[
idx
].
mtd_part
,
part_banks
[
idx
].
nums
);
part_banks
[
idx
].
nums
);
}
}
}
}
...
...
drivers/mtd/maps/ts5500_flash.c
View file @
69f34c98
...
@@ -19,11 +19,11 @@
...
@@ -19,11 +19,11 @@
*
*
* Note:
* Note:
* - In order for detection to work, jumper 3 must be set.
* - In order for detection to work, jumper 3 must be set.
* - Drive A and B use the resident flash disk (RFD) flash translation layer.
* - Drive A and B use the resident flash disk (RFD) flash translation layer.
* - If you have created your own jffs file system and the bios overwrites
* - If you have created your own jffs file system and the bios overwrites
* it during boot, try disabling Drive A: and B: in the boot order.
* it during boot, try disabling Drive A: and B: in the boot order.
*
*
* $Id: ts5500_flash.c,v 1.
4 2005/06/29 09:29:43 sean
Exp $
* $Id: ts5500_flash.c,v 1.
5 2005/11/07 11:14:28 gleixner
Exp $
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
...
drivers/mtd/maps/tsunami_flash.c
View file @
69f34c98
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* tsunami_flash.c
* tsunami_flash.c
*
*
* flash chip on alpha ds10...
* flash chip on alpha ds10...
* $Id: tsunami_flash.c,v 1.
9 2004/07/14 09:52:55 dwmw2
Exp $
* $Id: tsunami_flash.c,v 1.
10 2005/11/07 11:14:29 gleixner
Exp $
*/
*/
#include <asm/io.h>
#include <asm/io.h>
#include <asm/core_tsunami.h>
#include <asm/core_tsunami.h>
...
@@ -41,7 +41,7 @@ static void tsunami_flash_copy_from(
...
@@ -41,7 +41,7 @@ static void tsunami_flash_copy_from(
}
}
static
void
tsunami_flash_copy_to
(
static
void
tsunami_flash_copy_to
(
struct
map_info
*
map
,
unsigned
long
offset
,
struct
map_info
*
map
,
unsigned
long
offset
,
const
void
*
addr
,
ssize_t
len
)
const
void
*
addr
,
ssize_t
len
)
{
{
const
unsigned
char
*
src
;
const
unsigned
char
*
src
;
...
@@ -90,7 +90,7 @@ static int __init init_tsunami_flash(void)
...
@@ -90,7 +90,7 @@ static int __init init_tsunami_flash(void)
char
**
type
;
char
**
type
;
tsunami_tig_writeb
(
FLASH_ENABLE_BYTE
,
FLASH_ENABLE_PORT
);
tsunami_tig_writeb
(
FLASH_ENABLE_BYTE
,
FLASH_ENABLE_PORT
);
tsunami_flash_mtd
=
0
;
tsunami_flash_mtd
=
0
;
type
=
rom_probe_types
;
type
=
rom_probe_types
;
for
(;
!
tsunami_flash_mtd
&&
*
type
;
type
++
)
{
for
(;
!
tsunami_flash_mtd
&&
*
type
;
type
++
)
{
...
...
drivers/mtd/maps/uclinux.c
View file @
69f34c98
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
*
*
* $Id: uclinux.c,v 1.1
0 2005/01/05 18:05:13 dwmw2
Exp $
* $Id: uclinux.c,v 1.1
2 2005/11/07 11:14:29 gleixner
Exp $
*/
*/
/****************************************************************************/
/****************************************************************************/
...
@@ -82,7 +82,7 @@ int __init uclinux_mtd_init(void)
...
@@ -82,7 +82,7 @@ int __init uclinux_mtd_init(void)
iounmap
(
mapp
->
virt
);
iounmap
(
mapp
->
virt
);
return
(
-
ENXIO
);
return
(
-
ENXIO
);
}
}
mtd
->
owner
=
THIS_MODULE
;
mtd
->
owner
=
THIS_MODULE
;
mtd
->
point
=
uclinux_point
;
mtd
->
point
=
uclinux_point
;
mtd
->
priv
=
mapp
;
mtd
->
priv
=
mapp
;
...
...
drivers/mtd/maps/vmax301.c
View file @
69f34c98
// $Id: vmax301.c,v 1.3
0 2004/07/12 22:38:29 dwmw2
Exp $
// $Id: vmax301.c,v 1.3
2 2005/11/07 11:14:29 gleixner
Exp $
/* ######################################################################
/* ######################################################################
Tempustech VMAX SBC301 MTD Driver.
Tempustech VMAX SBC301 MTD Driver.
The VMAx 301 is a SBC based on . It
The VMAx 301 is a SBC based on . It
comes with three builtin AMD 29F016B flash chips and a socket for SRAM or
comes with three builtin AMD 29F016B flash chips and a socket for SRAM or
more flash. Each unit has it's own 8k mapping into a settable region
more flash. Each unit has it's own 8k mapping into a settable region
(0xD8000). There are two 8k mappings for each MTD, the first is always set
(0xD8000). There are two 8k mappings for each MTD, the first is always set
to the lower 8k of the device the second is paged. Writing a 16 bit page
to the lower 8k of the device the second is paged. Writing a 16 bit page
value to anywhere in the first 8k will cause the second 8k to page around.
value to anywhere in the first 8k will cause the second 8k to page around.
To boot the device a bios extension must be installed into the first 8k
To boot the device a bios extension must be installed into the first 8k
of flash that is smart enough to copy itself down, page in the rest of
of flash that is smart enough to copy itself down, page in the rest of
itself and begin executing.
itself and begin executing.
##################################################################### */
##################################################################### */
#include <linux/module.h>
#include <linux/module.h>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
/* Actually we could use two spinlocks, but we'd have to have
/* Actually we could use two spinlocks, but we'd have to have
more private space in the struct map_info. We lose a little
more private space in the struct map_info. We lose a little
performance like this, but we'd probably lose more by having
performance like this, but we'd probably lose more by having
the extra indirection from having one of the map->map_priv
the extra indirection from having one of the map->map_priv
fields pointing to yet another private struct.
fields pointing to yet another private struct.
*/
*/
static
DEFINE_SPINLOCK
(
vmax301_spin
);
static
DEFINE_SPINLOCK
(
vmax301_spin
);
...
@@ -98,7 +98,7 @@ static void vmax301_copy_to(struct map_info *map, unsigned long to, const void *
...
@@ -98,7 +98,7 @@ static void vmax301_copy_to(struct map_info *map, unsigned long to, const void *
spin_lock
(
&
vmax301_spin
);
spin_lock
(
&
vmax301_spin
);
vmax301_page
(
map
,
to
);
vmax301_page
(
map
,
to
);
memcpy_toio
(
map
->
map_priv_2
+
to
,
from
,
thislen
);
memcpy_toio
(
map
->
map_priv_2
+
to
,
from
,
thislen
);
spin_unlock
(
&
vmax301_spin
);
spin_unlock
(
&
vmax301_spin
);
to
+=
thislen
;
to
+=
thislen
;
from
+=
thislen
;
from
+=
thislen
;
len
-=
thislen
;
len
-=
thislen
;
...
@@ -137,7 +137,7 @@ static struct mtd_info *vmax_mtd[2] = {NULL, NULL};
...
@@ -137,7 +137,7 @@ static struct mtd_info *vmax_mtd[2] = {NULL, NULL};
static
void
__exit
cleanup_vmax301
(
void
)
static
void
__exit
cleanup_vmax301
(
void
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
vmax_mtd
[
i
])
{
if
(
vmax_mtd
[
i
])
{
del_mtd_device
(
vmax_mtd
[
i
]);
del_mtd_device
(
vmax_mtd
[
i
]);
...
@@ -161,13 +161,13 @@ int __init init_vmax301(void)
...
@@ -161,13 +161,13 @@ int __init init_vmax301(void)
return
-
EIO
;
return
-
EIO
;
}
}
/* Put the address in the map's private data area.
/* Put the address in the map's private data area.
We store the actual MTD IO address rather than the
We store the actual MTD IO address rather than the
address of the first half, because it's used more
address of the first half, because it's used more
often.
often.
*/
*/
vmax_map
[
0
].
map_priv_2
=
iomapadr
+
WINDOW_START
;
vmax_map
[
0
].
map_priv_2
=
iomapadr
+
WINDOW_START
;
vmax_map
[
1
].
map_priv_2
=
iomapadr
+
(
3
*
WINDOW_START
);
vmax_map
[
1
].
map_priv_2
=
iomapadr
+
(
3
*
WINDOW_START
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
vmax_mtd
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
vmax_map
[
i
]);
vmax_mtd
[
i
]
=
do_map_probe
(
"cfi_probe"
,
&
vmax_map
[
i
]);
if
(
!
vmax_mtd
[
i
])
if
(
!
vmax_mtd
[
i
])
...
...
drivers/mtd/maps/walnut.c
View file @
69f34c98
/*
/*
* $Id: walnut.c,v 1.
2 2004/12/10 12:07:42 holindho
Exp $
* $Id: walnut.c,v 1.
3 2005/11/07 11:14:29 gleixner
Exp $
*
*
* Mapping for Walnut flash
* Mapping for Walnut flash
* (used ebony.c as a "framework")
* (used ebony.c as a "framework")
*
*
* Heikki Lindholm <holindho@infradead.org>
* Heikki Lindholm <holindho@infradead.org>
*
*
*
*
* This program is free software; you can redistribute it and/or modify it
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* Free Software Foundation; either version 2 of the License, or (at your
...
@@ -48,7 +48,7 @@ static struct mtd_partition walnut_partitions[] = {
...
@@ -48,7 +48,7 @@ static struct mtd_partition walnut_partitions[] = {
.
name
=
"OpenBIOS"
,
.
name
=
"OpenBIOS"
,
.
offset
=
0x0
,
.
offset
=
0x0
,
.
size
=
WALNUT_FLASH_SIZE
,
.
size
=
WALNUT_FLASH_SIZE
,
/*.mask_flags = MTD_WRITEABLE, */
/* force read-only */
/*.mask_flags = MTD_WRITEABLE, */
/* force read-only */
}
}
};
};
...
@@ -72,11 +72,11 @@ int __init init_walnut(void)
...
@@ -72,11 +72,11 @@ int __init init_walnut(void)
printk
(
"The on-board flash is disabled (U79 sw 5)!"
);
printk
(
"The on-board flash is disabled (U79 sw 5)!"
);
return
-
EIO
;
return
-
EIO
;
}
}
if
(
WALNUT_FLASH_SRAM_SEL
(
fpga_brds1
))
if
(
WALNUT_FLASH_SRAM_SEL
(
fpga_brds1
))
flash_base
=
WALNUT_FLASH_LOW
;
flash_base
=
WALNUT_FLASH_LOW
;
else
else
flash_base
=
WALNUT_FLASH_HIGH
;
flash_base
=
WALNUT_FLASH_HIGH
;
walnut_map
.
phys
=
flash_base
;
walnut_map
.
phys
=
flash_base
;
walnut_map
.
virt
=
walnut_map
.
virt
=
(
void
__iomem
*
)
ioremap
(
flash_base
,
walnut_map
.
size
);
(
void
__iomem
*
)
ioremap
(
flash_base
,
walnut_map
.
size
);
...
...
drivers/mtd/maps/wr_sbc82xx_flash.c
View file @
69f34c98
/*
/*
* $Id: wr_sbc82xx_flash.c,v 1.
7 2004/11/04 13:24:15
gleixner Exp $
* $Id: wr_sbc82xx_flash.c,v 1.
8 2005/11/07 11:14:29
gleixner Exp $
*
*
* Map for flash chips on Wind River PowerQUICC II SBC82xx board.
* Map for flash chips on Wind River PowerQUICC II SBC82xx board.
*
*
...
@@ -163,10 +163,10 @@ static void __exit cleanup_sbc82xx_flash(void)
...
@@ -163,10 +163,10 @@ static void __exit cleanup_sbc82xx_flash(void)
del_mtd_partitions
(
sbcmtd
[
i
]);
del_mtd_partitions
(
sbcmtd
[
i
]);
else
else
del_mtd_device
(
sbcmtd
[
i
]);
del_mtd_device
(
sbcmtd
[
i
]);
kfree
(
sbcmtd_parts
[
i
]);
kfree
(
sbcmtd_parts
[
i
]);
map_destroy
(
sbcmtd
[
i
]);
map_destroy
(
sbcmtd
[
i
]);
iounmap
((
void
*
)
sbc82xx_flash_map
[
i
].
virt
);
iounmap
((
void
*
)
sbc82xx_flash_map
[
i
].
virt
);
sbc82xx_flash_map
[
i
].
virt
=
0
;
sbc82xx_flash_map
[
i
].
virt
=
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment