Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
cc6d3ff3
Commit
cc6d3ff3
authored
Aug 24, 2006
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: DaVinci: Add NOR flash support using MTD physmap layer
Signed-off-by:
Kevin Hilman
<
khilman@mvista.com
>
parent
7dcab67c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
arch/arm/mach-davinci/board-evm.c
arch/arm/mach-davinci/board-evm.c
+65
-0
include/asm-arm/arch-davinci/hardware.h
include/asm-arm/arch-davinci/hardware.h
+3
-0
No files found.
arch/arm/mach-davinci/board-evm.c
View file @
cc6d3ff3
...
...
@@ -37,6 +37,9 @@
#include <linux/root_dev.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
#include <linux/usb_musb.h>
#endif
...
...
@@ -54,6 +57,61 @@
#include <asm/arch/hardware.h>
#include "clock.h"
static
struct
mtd_partition
davinci_evm_partitions
[]
=
{
/* bootloader (U-Boot, etc) in first 4 sectors */
{
.
name
=
"bootloader"
,
.
offset
=
0
,
.
size
=
4
*
SZ_64K
,
.
mask_flags
=
MTD_WRITEABLE
,
/* force read-only */
},
/* bootloader params in the next 1 sectors */
{
.
name
=
"params"
,
.
offset
=
MTDPART_OFS_APPEND
,
.
size
=
SZ_64K
,
.
mask_flags
=
0
,
},
/* kernel */
{
.
name
=
"kernel"
,
.
offset
=
MTDPART_OFS_APPEND
,
.
size
=
SZ_2M
,
.
mask_flags
=
0
},
/* file system */
{
.
name
=
"filesystem"
,
.
offset
=
MTDPART_OFS_APPEND
,
.
size
=
MTDPART_SIZ_FULL
,
.
mask_flags
=
0
}
};
static
struct
physmap_flash_data
davinci_evm_flash_data
=
{
.
width
=
2
,
.
parts
=
davinci_evm_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_evm_partitions
),
};
/* NOTE: CFI probe will correctly detect flash part as 32M, but EMIF
* limits addresses to 16M, so using addresses past 16M will wrap */
static
struct
resource
davinci_evm_flash_resource
=
{
.
start
=
DAVINCI_CS0_PHYS
,
.
end
=
DAVINCI_CS0_PHYS
+
SZ_16M
-
1
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
davinci_evm_flash_device
=
{
.
name
=
"physmap-flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
davinci_evm_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
davinci_evm_flash_resource
,
};
/*
* USB
*/
...
...
@@ -121,6 +179,10 @@ static inline void setup_usb(void)
#define setup_usb(void) do {} while(0)
#endif
/* CONFIG_USB_MUSB_HDRC */
static
struct
platform_device
*
davinci_evm_devices
[]
__initdata
=
{
&
davinci_evm_flash_device
,
};
static
void
board_init
(
void
)
{
board_setup_psc
(
DAVINCI_GPSC_ARMDOMAIN
,
DAVINCI_LPSC_VPSSMSTR
,
1
);
...
...
@@ -144,6 +206,9 @@ davinci_evm_map_io(void)
static
__init
void
davinci_evm_init
(
void
)
{
platform_add_devices
(
davinci_evm_devices
,
ARRAY_SIZE
(
davinci_evm_devices
));
davinci_serial_init
();
setup_usb
();
}
...
...
include/asm-arm/arch-davinci/hardware.h
View file @
cc6d3ff3
...
...
@@ -127,4 +127,7 @@
#define DAVINCI_LPSC_GEM 39 // GEM LPSC
#define DAVINCI_LPSC_IMCOP 40 // IMCOP LPSC
/* NOR Flash base address set to CS0 by default */
#define DAVINCI_CS0_PHYS 0x02000000
#endif
/* __ASM_ARCH_HARDWARE_H */
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