Update of /cvsroot/blob/blob/src/blob
In directory sc8-pr-cvs1:/tmp/cvs-serv14776/src/blob
Modified Files:
ra_alpha.c
Log Message:
Remove old LED stuf. Fix defines, memory config.
Add proper partition support.
Index: ra_alpha.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/ra_alpha.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ra_alpha.c 5 Nov 2003 10:09:45 -0000 1.1
+++ ra_alpha.c 10 Nov 2003 20:54:25 -0000 1.2
@@ -40,57 +40,11 @@
#include <blob/partition.h>
#include <blob/time.h>
-#define GPIO25_LED GPIO_bit(0)
-
-static int led_state;
-static int led_locked;
-
-static void rt_alpha_led_on (void)
-{
- if (!led_locked) {
- GPSR0 = GPIO25_LED;
- led_state = 1;
- }
-}
-
-static void rt_alpha_led_off (void)
-{
- if (!led_locked) {
- GPCR0 = GPIO25_LED;
- led_state = 0;
- }
-}
-
-static void rt_alpha_led_toggle (void)
-{
- if (led_state)
- rt_alpha_led_off ();
- else
- rt_alpha_led_on ();
-}
-
-static void rt_alpha_led_lock (void)
-{
- led_locked = 1;
-}
-
-static void rt_alpha_led_unlock (void)
-{
- led_locked = 0;
-}
-
static void rt_alpha_init_driver (void)
{
- static led_driver_t rt_alpha_led_driver = {
- .led_on = rt_alpha_led_on,
- .led_off = rt_alpha_led_off,
- .led_toggle = rt_alpha_led_toggle,
- .led_lock = rt_alpha_led_lock,
- .led_unlock = rt_alpha_led_unlock
- };
static const flash_descriptor_t flash[] = {
{
- .size = 128 * 1024,
+ .size = 2 * 128 * 1024,
.num = 64,
.lockable = 1
},
@@ -102,57 +56,75 @@
.next = sizeof (blob_partition_t),
.offset = 0x00000000,
.size = BLOB_PART_SIZ_FULL
- }, {
- .magic = BLOB_PART_VALID_MAGIC,
- .next = sizeof (blob_partition_t),
- .offset = BLOB_PART_OFS_APPEND,
- .size = BLOB_FLASH_LEN,
- .name = "blob",
- .mem_base = BLOB_RAM_BASE
- }, {
- .magic = BLOB_PART_VALID_MAGIC,
- .next = sizeof (blob_partition_t),
- .offset = BLOB_PART_OFS_APPEND,
- .size = PARAM_FLASH_LEN,
- .name = "param",
- .flags = BLOB_PART_FLAG_PTABLE
- }, {
- .magic = BLOB_PART_VALID_MAGIC,
- .next = sizeof (blob_partition_t),
- .offset = BLOB_PART_OFS_APPEND,
- .size = KERNEL_FLASH_LEN,
- .name = "kernel",
- .flags = BLOB_PART_FLAG_EXEC,
- .mem_base = KERNEL_RAM_BASE,
- .entry_point= KERNEL_RAM_BASE
- }, {
- .magic = BLOB_PART_VALID_MAGIC,
- .next = sizeof (blob_partition_t),
- .offset = BLOB_PART_OFS_APPEND,
- .size = RAMDISK_FLASH_LEN,
- .name = "ramdisk",
- .flags = BLOB_PART_FLAG_LOAD,
- .mem_base = RAMDISK_RAM_BASE
- }, {
- .magic = BLOB_PART_VALID_MAGIC,
- .next = sizeof (blob_partition_t),
- .offset = BLOB_PART_OFS_APPEND,
- .size = BLOB_PART_SIZ_FULL,
- .name = "jffs2",
- .flags = BLOB_PART_FLAG_JFFS2
- }, {
- .magic = BLOB_PART_LAST_MAGIC
+ },{
+ /* blob itself */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: BLOB_FLASH_BASE,
+ size: BLOB_FLASH_LEN,
+ name: "blob",
+ mem_base: BLOB_RAM_BASE
+ },
+ {
+ /* system config area */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: CONFIG_FLASH_BASE,
+ size: CONFIG_FLASH_LEN,
+ name: "config.tar",
+ flags: 0
+ },
+ {
+ /* kernel */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: KERNEL_FLASH_BASE,
+ size: KERNEL_FLASH_LEN,
+ name: "zImage",
+ flags: BLOB_PART_FLAG_LOAD | BLOB_PART_FLAG_EXEC,
+ mem_base: KERNEL_RAM_BASE,
+ entry_point: KERNEL_RAM_BASE
+ },
+ {
+ /* ramdisk */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: RAMDISK_FLASH_BASE,
+ size: RAMDISK_FLASH_LEN,
+ name: "initrd.gz",
+ flags: BLOB_PART_FLAG_LOAD,
+ mem_base: RAMDISK_RAM_BASE
+ },
+ {
+ /* root (cramfs) */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: ROOTFS_FLASH_BASE,
+ size: ROOTFS_FLASH_LEN,
+ name: "cramfs",
+ flags: BLOB_PART_FLAG_CRAMFS,
+ },
+ {
+ /* data (cramfs) */
+ magic: BLOB_PART_VALID_MAGIC,
+ next: sizeof(blob_partition_t),
+ offset: DATAFS_FLASH_BASE,
+ size: DATAFS_FLASH_LEN,
+ name: "data.img",
+ flags: BLOB_PART_FLAG_CRAMFS,
+ },
+ {
+ /* last entry */
+ magic: BLOB_PART_LAST_MAGIC
}
};
- GPDR0 |= GPIO25_LED;
-
flash_descriptors = flash;
reboot_driver = &pxa_reboot_driver;
serial_driver = &pxa_serial_driver;
flash_driver = &intel32_flash_driver;
- led_driver = &rt_alpha_led_driver;
+ led_driver = &pxa_gpio_led_driver;
timer_driver = &intelarm_timer_driver;
default_partition_table = partitions;
|