mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
m68knommu: add basic support for the ColdFire based FireBee board
The FireBee is a ColdFire 5475 based board. Add a configuration option to support it, and the basic platform flash layout code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
parent
d4852a34e4
commit
7badfabb3f
@ -519,6 +519,12 @@ config M5407C3
|
|||||||
help
|
help
|
||||||
Support for the Motorola M5407C3 board.
|
Support for the Motorola M5407C3 board.
|
||||||
|
|
||||||
|
config FIREBEE
|
||||||
|
bool "FireBee board support"
|
||||||
|
depends on M547x
|
||||||
|
help
|
||||||
|
Support for the FireBee ColdFire 5475 based board.
|
||||||
|
|
||||||
config CLEOPATRA
|
config CLEOPATRA
|
||||||
bool "Feith CLEOPATRA board support"
|
bool "Feith CLEOPATRA board support"
|
||||||
depends on (M5307 || M5407)
|
depends on (M5307 || M5407)
|
||||||
|
@ -15,4 +15,5 @@
|
|||||||
asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
|
asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
|
||||||
|
|
||||||
obj-y := config.o
|
obj-y := config.o
|
||||||
|
obj-$(CONFIG_FIREBEE) += firebee.o
|
||||||
|
|
||||||
|
86
arch/m68knommu/platform/54xx/firebee.c
Normal file
86
arch/m68knommu/platform/54xx/firebee.c
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* firebee.c -- extra startup code support for the FireBee boards
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011, Greg Ungerer (gerg@snapgear.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/mtd/mtd.h>
|
||||||
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
|
#include <asm/coldfire.h>
|
||||||
|
#include <asm/mcfsim.h>
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 8MB of NOR flash fitted to the FireBee board.
|
||||||
|
*/
|
||||||
|
#define FLASH_PHYS_ADDR 0xe0000000 /* Physical address of flash */
|
||||||
|
#define FLASH_PHYS_SIZE 0x00800000 /* Size of flash */
|
||||||
|
|
||||||
|
#define PART_BOOT_START 0x00000000 /* Start at bottom of flash */
|
||||||
|
#define PART_BOOT_SIZE 0x00040000 /* 256k in size */
|
||||||
|
#define PART_IMAGE_START 0x00040000 /* Start after boot loader */
|
||||||
|
#define PART_IMAGE_SIZE 0x006c0000 /* Most of flash */
|
||||||
|
#define PART_FPGA_START 0x00700000 /* Start at offset 7MB */
|
||||||
|
#define PART_FPGA_SIZE 0x00100000 /* 1MB in size */
|
||||||
|
|
||||||
|
static struct mtd_partition firebee_flash_parts[] = {
|
||||||
|
{
|
||||||
|
.name = "dBUG",
|
||||||
|
.offset = PART_BOOT_START,
|
||||||
|
.size = PART_BOOT_SIZE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "FPGA",
|
||||||
|
.offset = PART_FPGA_START,
|
||||||
|
.size = PART_FPGA_SIZE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "image",
|
||||||
|
.offset = PART_IMAGE_START,
|
||||||
|
.size = PART_IMAGE_SIZE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct physmap_flash_data firebee_flash_data = {
|
||||||
|
.width = 2,
|
||||||
|
.nr_parts = ARRAY_SIZE(firebee_flash_parts),
|
||||||
|
.parts = firebee_flash_parts,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource firebee_flash_resource = {
|
||||||
|
.start = FLASH_PHYS_ADDR,
|
||||||
|
.end = FLASH_PHYS_ADDR + FLASH_PHYS_SIZE,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device firebee_flash = {
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.id = 0,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &firebee_flash_data,
|
||||||
|
},
|
||||||
|
.num_resources = 1,
|
||||||
|
.resource = &firebee_flash_resource,
|
||||||
|
};
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
|
||||||
|
static int __init init_firebee(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&firebee_flash);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
arch_initcall(init_firebee);
|
||||||
|
|
||||||
|
/***************************************************************************/
|
Loading…
Reference in New Issue
Block a user