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
nexedi
linux
Commits
ab9c9f80
Commit
ab9c9f80
authored
Feb 26, 2003
by
Art Haas
Committed by
Linus Torvalds
Feb 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] C99 initializers for drivers/mtd/chips
parent
c6ad60b9
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
338 additions
and
301 deletions
+338
-301
drivers/mtd/chips/amd_flash.c
drivers/mtd/chips/amd_flash.c
+162
-162
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0001.c
+4
-4
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0002.c
+4
-4
drivers/mtd/chips/cfi_probe.c
drivers/mtd/chips/cfi_probe.c
+5
-5
drivers/mtd/chips/jedec.c
drivers/mtd/chips/jedec.c
+48
-11
drivers/mtd/chips/jedec_probe.c
drivers/mtd/chips/jedec_probe.c
+101
-101
drivers/mtd/chips/map_absent.c
drivers/mtd/chips/map_absent.c
+4
-4
drivers/mtd/chips/map_ram.c
drivers/mtd/chips/map_ram.c
+3
-3
drivers/mtd/chips/map_rom.c
drivers/mtd/chips/map_rom.c
+3
-3
drivers/mtd/chips/sharp.c
drivers/mtd/chips/sharp.c
+4
-4
No files found.
drivers/mtd/chips/amd_flash.c
View file @
ab9c9f80
This diff is collapsed.
Click to expand it.
drivers/mtd/chips/cfi_cmdset_0001.c
View file @
ab9c9f80
...
...
@@ -47,10 +47,10 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *, int);
static
struct
mtd_info
*
cfi_intelext_setup
(
struct
map_info
*
);
static
struct
mtd_chip_driver
cfi_intelext_chipdrv
=
{
probe:
NULL
,
/* Not usable directly */
destroy:
cfi_intelext_destroy
,
name:
"cfi_cmdset_0001"
,
module:
THIS_MODULE
.
probe
=
NULL
,
/* Not usable directly */
.
destroy
=
cfi_intelext_destroy
,
.
name
=
"cfi_cmdset_0001"
,
.
module
=
THIS_MODULE
};
/* #define DEBUG_LOCK_BITS */
...
...
drivers/mtd/chips/cfi_cmdset_0002.c
View file @
ab9c9f80
...
...
@@ -43,10 +43,10 @@ static struct mtd_info *cfi_amdstd_setup (struct map_info *);
static
struct
mtd_chip_driver
cfi_amdstd_chipdrv
=
{
probe:
NULL
,
/* Not usable directly */
destroy:
cfi_amdstd_destroy
,
name:
"cfi_cmdset_0002"
,
module:
THIS_MODULE
.
probe
=
NULL
,
/* Not usable directly */
.
destroy
=
cfi_amdstd_destroy
,
.
name
=
"cfi_cmdset_0002"
,
.
module
=
THIS_MODULE
};
struct
mtd_info
*
cfi_cmdset_0002
(
struct
map_info
*
map
,
int
primary
)
...
...
drivers/mtd/chips/cfi_probe.c
View file @
ab9c9f80
...
...
@@ -294,8 +294,8 @@ static void print_cfi_ident(struct cfi_ident *cfip)
#endif
/* DEBUG_CFI */
static
struct
chip_probe
cfi_chip_probe
=
{
name:
"CFI"
,
probe_chip:
cfi_probe_chip
.
name
=
"CFI"
,
.
probe_chip
=
cfi_probe_chip
};
struct
mtd_info
*
cfi_probe
(
struct
map_info
*
map
)
...
...
@@ -308,9 +308,9 @@ struct mtd_info *cfi_probe(struct map_info *map)
}
static
struct
mtd_chip_driver
cfi_chipdrv
=
{
probe:
cfi_probe
,
name:
"cfi_probe"
,
module:
THIS_MODULE
.
probe
=
cfi_probe
,
.
name
=
"cfi_probe"
,
.
module
=
THIS_MODULE
};
int
__init
cfi_probe_init
(
void
)
...
...
drivers/mtd/chips/jedec.c
View file @
ab9c9f80
...
...
@@ -33,14 +33,51 @@ static unsigned long my_bank_size;
/* Listing of parts and sizes. We need this table to learn the sector
size of the chip and the total length */
static
const
struct
JEDECTable
JEDEC_table
[]
=
{{
0x013D
,
"AMD Am29F017D"
,
2
*
1024
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{
0x01AD
,
"AMD Am29F016"
,
2
*
1024
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{
0x01D5
,
"AMD Am29F080"
,
1
*
1024
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{
0x01A4
,
"AMD Am29F040"
,
512
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{
0x20E3
,
"AMD Am29W040B"
,
512
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{
0xC2AD
,
"Macronix MX29F016"
,
2
*
1024
*
1024
,
64
*
1024
,
MTD_CAP_NORFLASH
},
{}};
static
const
struct
JEDECTable
JEDEC_table
[]
=
{
{
.
jedec
=
0x013D
,
.
name
=
"AMD Am29F017D"
,
.
size
=
2
*
1024
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0x01AD
,
.
name
=
"AMD Am29F016"
,
.
size
=
2
*
1024
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0x01D5
,
.
name
=
"AMD Am29F080"
,
.
size
=
1
*
1024
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0x01A4
,
.
name
=
"AMD Am29F040"
,
.
size
=
512
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0x20E3
,
.
name
=
"AMD Am29W040B"
,
.
size
=
512
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0xC2AD
,
.
name
=
"Macronix MX29F016"
,
.
size
=
2
*
1024
*
1024
,
.
sectorsize
=
64
*
1024
,
.
capabilities
=
MTD_CAP_NORFLASH
},
{
.
jedec
=
0x0
}
};
static
const
struct
JEDECTable
*
jedec_idtoinf
(
__u8
mfr
,
__u8
id
);
static
void
jedec_sync
(
struct
mtd_info
*
mtd
)
{};
...
...
@@ -54,9 +91,9 @@ static struct mtd_info *jedec_probe(struct map_info *map);
static
struct
mtd_chip_driver
jedec_chipdrv
=
{
probe:
jedec_probe
,
name:
"jedec"
,
module:
THIS_MODULE
.
probe
=
jedec_probe
,
.
name
=
"jedec"
,
.
module
=
THIS_MODULE
};
/* Probe entry point */
...
...
drivers/mtd/chips/jedec_probe.c
View file @
ab9c9f80
...
...
@@ -75,176 +75,176 @@ struct amd_flash_info {
static
const
struct
amd_flash_info
jedec_table
[]
=
{
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29LV160DT
,
name:
"AMD AM29LV160DT"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
31
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29LV160DT
,
.
name
=
"AMD AM29LV160DT"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
31
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29LV160DB
,
name:
"AMD AM29LV160DB"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29LV160DB
,
.
name
=
"AMD AM29LV160DB"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
31
)
}
},
{
mfr_id:
MANUFACTURER_TOSHIBA
,
dev_id:
TC58FVT160
,
name:
"Toshiba TC58FVT160"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
31
),
.
mfr_id
=
MANUFACTURER_TOSHIBA
,
.
dev_id
=
TC58FVT160
,
.
name
=
"Toshiba TC58FVT160"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
31
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_FUJITSU
,
dev_id:
MBM29LV160TE
,
name:
"Fujitsu MBM29LV160TE"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
31
),
.
mfr_id
=
MANUFACTURER_FUJITSU
,
.
dev_id
=
MBM29LV160TE
,
.
name
=
"Fujitsu MBM29LV160TE"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
31
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_TOSHIBA
,
dev_id:
TC58FVB160
,
name:
"Toshiba TC58FVB160"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_TOSHIBA
,
.
dev_id
=
TC58FVB160
,
.
name
=
"Toshiba TC58FVB160"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
31
)
}
},
{
mfr_id:
MANUFACTURER_FUJITSU
,
dev_id:
MBM29LV160BE
,
name:
"Fujitsu MBM29LV160BE"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_FUJITSU
,
.
dev_id
=
MBM29LV160BE
,
.
name
=
"Fujitsu MBM29LV160BE"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
31
)
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29LV800BB
,
name:
"AMD AM29LV800BB"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29LV800BB
,
.
name
=
"AMD AM29LV800BB"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
15
),
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29F800BB
,
name:
"AMD AM29F800BB"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29F800BB
,
.
name
=
"AMD AM29F800BB"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
15
),
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29LV800BT
,
name:
"AMD AM29LV800BT"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
15
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29LV800BT
,
.
name
=
"AMD AM29LV800BT"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
15
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29F800BT
,
name:
"AMD AM29F800BT"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
15
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29F800BT
,
.
name
=
"AMD AM29F800BT"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
15
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_AMD
,
dev_id:
AM29LV800BB
,
name:
"AMD AM29LV800BB"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
15
),
.
mfr_id
=
MANUFACTURER_AMD
,
.
dev_id
=
AM29LV800BB
,
.
name
=
"AMD AM29LV800BB"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
15
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_ST
,
dev_id:
M29W800T
,
name:
"ST M29W800T"
,
DevSize:
SIZE_1MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
15
),
.
mfr_id
=
MANUFACTURER_ST
,
.
dev_id
=
M29W800T
,
.
name
=
"ST M29W800T"
,
.
DevSize
=
SIZE_1MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
15
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_ST
,
dev_id:
M29W160DT
,
name:
"ST M29W160DT"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x10000
,
31
),
.
mfr_id
=
MANUFACTURER_ST
,
.
dev_id
=
M29W160DT
,
.
name
=
"ST M29W160DT"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x10000
,
31
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x04000
,
1
)
}
},
{
mfr_id:
MANUFACTURER_ST
,
dev_id:
M29W160DB
,
name:
"ST M29W160DB"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
4
,
regions:
{
ERASEINFO
(
0x04000
,
1
),
.
mfr_id
=
MANUFACTURER_ST
,
.
dev_id
=
M29W160DB
,
.
name
=
"ST M29W160DB"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
4
,
.
regions
=
{
ERASEINFO
(
0x04000
,
1
),
ERASEINFO
(
0x02000
,
2
),
ERASEINFO
(
0x08000
,
1
),
ERASEINFO
(
0x10000
,
31
)
}
},
{
mfr_id:
MANUFACTURER_ATMEL
,
dev_id:
AT49BV16X4
,
name:
"Atmel AT49BV16X4"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
3
,
regions:
{
ERASEINFO
(
0x02000
,
8
),
.
mfr_id
=
MANUFACTURER_ATMEL
,
.
dev_id
=
AT49BV16X4
,
.
name
=
"Atmel AT49BV16X4"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
3
,
.
regions
=
{
ERASEINFO
(
0x02000
,
8
),
ERASEINFO
(
0x08000
,
2
),
ERASEINFO
(
0x10000
,
30
)
}
},
{
mfr_id:
MANUFACTURER_ATMEL
,
dev_id:
AT49BV16X4T
,
name:
"Atmel AT49BV16X4T"
,
DevSize:
SIZE_2MiB
,
NumEraseRegions:
3
,
regions:
{
ERASEINFO
(
0x10000
,
30
),
.
mfr_id
=
MANUFACTURER_ATMEL
,
.
dev_id
=
AT49BV16X4T
,
.
name
=
"Atmel AT49BV16X4T"
,
.
DevSize
=
SIZE_2MiB
,
.
NumEraseRegions
=
3
,
.
regions
=
{
ERASEINFO
(
0x10000
,
30
),
ERASEINFO
(
0x08000
,
2
),
ERASEINFO
(
0x02000
,
8
)
}
...
...
@@ -403,8 +403,8 @@ static int jedec_probe_chip(struct map_info *map, __u32 base,
}
static
struct
chip_probe
jedec_chip_probe
=
{
name:
"JEDEC"
,
probe_chip:
jedec_probe_chip
.
name
=
"JEDEC"
,
.
probe_chip
=
jedec_probe_chip
};
struct
mtd_info
*
jedec_probe
(
struct
map_info
*
map
)
...
...
@@ -417,9 +417,9 @@ struct mtd_info *jedec_probe(struct map_info *map)
}
static
struct
mtd_chip_driver
jedec_chipdrv
=
{
probe:
jedec_probe
,
name:
"jedec_probe"
,
module:
THIS_MODULE
.
probe
=
jedec_probe
,
.
name
=
"jedec_probe"
,
.
module
=
THIS_MODULE
};
int
__init
jedec_probe_init
(
void
)
...
...
drivers/mtd/chips/map_absent.c
View file @
ab9c9f80
...
...
@@ -36,10 +36,10 @@ static void map_absent_destroy (struct mtd_info *);
static
struct
mtd_chip_driver
map_absent_chipdrv
=
{
probe:
map_absent_probe
,
destroy:
map_absent_destroy
,
name:
"map_absent"
,
module:
THIS_MODULE
.
probe
=
map_absent_probe
,
.
destroy
=
map_absent_destroy
,
.
name
=
"map_absent"
,
.
module
=
THIS_MODULE
};
static
struct
mtd_info
*
map_absent_probe
(
struct
map_info
*
map
)
...
...
drivers/mtd/chips/map_ram.c
View file @
ab9c9f80
...
...
@@ -23,9 +23,9 @@ static struct mtd_info *map_ram_probe(struct map_info *map);
static
struct
mtd_chip_driver
mapram_chipdrv
=
{
probe:
map_ram_probe
,
name:
"map_ram"
,
module:
THIS_MODULE
.
probe
=
map_ram_probe
,
.
name
=
"map_ram"
,
.
module
=
THIS_MODULE
};
static
struct
mtd_info
*
map_ram_probe
(
struct
map_info
*
map
)
...
...
drivers/mtd/chips/map_rom.c
View file @
ab9c9f80
...
...
@@ -21,9 +21,9 @@ static void maprom_nop (struct mtd_info *);
struct
mtd_info
*
map_rom_probe
(
struct
map_info
*
map
);
static
struct
mtd_chip_driver
maprom_chipdrv
=
{
probe:
map_rom_probe
,
name:
"map_rom"
,
module:
THIS_MODULE
.
probe
=
map_rom_probe
,
.
name
=
"map_rom"
,
.
module
=
THIS_MODULE
};
struct
mtd_info
*
map_rom_probe
(
struct
map_info
*
map
)
...
...
drivers/mtd/chips/sharp.c
View file @
ab9c9f80
...
...
@@ -98,10 +98,10 @@ struct mtd_info *sharp_probe(struct map_info *map);
static
void
sharp_destroy
(
struct
mtd_info
*
mtd
);
static
struct
mtd_chip_driver
sharp_chipdrv
=
{
probe:
sharp_probe
,
destroy:
sharp_destroy
,
name:
"sharp"
,
module:
THIS_MODULE
.
probe
=
sharp_probe
,
.
destroy
=
sharp_destroy
,
.
name
=
"sharp"
,
.
module
=
THIS_MODULE
};
...
...
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