-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 319614 b: refs/heads/master c: 4b897d5 h: refs/heads/master v: v3
- Loading branch information
Jonas Gorski
authored and
Ralf Baechle
committed
Jul 24, 2012
1 parent
b0e53c7
commit 20df6dd
Showing
5 changed files
with
80 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 553072b27e0990ab1d73d43efb4ab518f953fcc3 | ||
refs/heads/master: 4b897d5483da5c3f3c4d52440a994aad574b62b4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \ | ||
dev-dsp.o dev-enet.o dev-pcmcia.o dev-rng.o dev-spi.o \ | ||
dev-uart.o dev-wdt.o | ||
dev-dsp.o dev-enet.o dev-flash.o dev-pcmcia.o dev-rng.o \ | ||
dev-spi.o dev-uart.o dev-wdt.o | ||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | ||
|
||
obj-y += boards/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Broadcom BCM63xx flash registration | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> | ||
* Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/mtd/mtd.h> | ||
#include <linux/mtd/partitions.h> | ||
#include <linux/mtd/physmap.h> | ||
|
||
#include <bcm63xx_cpu.h> | ||
#include <bcm63xx_dev_flash.h> | ||
#include <bcm63xx_regs.h> | ||
#include <bcm63xx_io.h> | ||
|
||
static struct mtd_partition mtd_partitions[] = { | ||
{ | ||
.name = "cfe", | ||
.offset = 0x0, | ||
.size = 0x40000, | ||
} | ||
}; | ||
|
||
static const char *bcm63xx_part_types[] = { "bcm63xxpart", NULL }; | ||
|
||
static struct physmap_flash_data flash_data = { | ||
.width = 2, | ||
.parts = mtd_partitions, | ||
.part_probe_types = bcm63xx_part_types, | ||
}; | ||
|
||
static struct resource mtd_resources[] = { | ||
{ | ||
.start = 0, /* filled at runtime */ | ||
.end = 0, /* filled at runtime */ | ||
.flags = IORESOURCE_MEM, | ||
} | ||
}; | ||
|
||
static struct platform_device mtd_dev = { | ||
.name = "physmap-flash", | ||
.resource = mtd_resources, | ||
.num_resources = ARRAY_SIZE(mtd_resources), | ||
.dev = { | ||
.platform_data = &flash_data, | ||
}, | ||
}; | ||
|
||
int __init bcm63xx_flash_register(void) | ||
{ | ||
u32 val; | ||
|
||
/* read base address of boot chip select (0) */ | ||
val = bcm_mpi_readl(MPI_CSBASE_REG(0)); | ||
val &= MPI_CSBASE_BASE_MASK; | ||
|
||
mtd_resources[0].start = val; | ||
mtd_resources[0].end = 0x1FFFFFFF; | ||
|
||
return platform_device_register(&mtd_dev); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef __BCM63XX_FLASH_H | ||
#define __BCM63XX_FLASH_H | ||
|
||
int __init bcm63xx_flash_register(void); | ||
|
||
#endif /* __BCM63XX_FLASH_H */ |