|
From: Abraham vd M. <ab...@us...> - 2003-08-07 19:31:06
|
Update of /cvsroot/blob/blob/src/blob
In directory sc8-pr-cvs1:/tmp/cvs-serv17234/src/blob
Modified Files:
csir_ims.c gpio-pxa.S lart.c main.c partition.c start-pxa.S
start-sa11x0.S
Log Message:
Fixed a couple of bugs in my previous set of changes. The PXA port is now
fully functional. Also added a patch from Yves Rutschle which fixes a bug in
the serial code.
Index: csir_ims.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/csir_ims.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- csir_ims.c 6 Aug 2003 23:00:52 -0000 1.1
+++ csir_ims.c 7 Aug 2003 19:31:00 -0000 1.2
@@ -37,6 +37,7 @@
#include <blob/command.h>
#include <blob/uucodec.h>
#include <blob/led.h>
+#include <blob/partition.h>
#define GPIO25_LED GPIO_bit(25)
@@ -77,16 +78,15 @@
led_locked = 0;
}
-static led_driver_t csir_ims_led_driver = {
- .led_on = csir_ims_led_on,
- .led_off = csir_ims_led_off,
- .led_toggle = csir_ims_led_toggle,
- .led_lock = csir_ims_led_lock,
- .led_unlock = csir_ims_led_unlock
-};
-
static void csir_ims_init_driver (void)
{
+ static led_driver_t csir_ims_led_driver = {
+ .led_on = csir_ims_led_on,
+ .led_off = csir_ims_led_off,
+ .led_toggle = csir_ims_led_toggle,
+ .led_lock = csir_ims_led_lock,
+ .led_unlock = csir_ims_led_unlock
+ };
static const flash_descriptor_t flash[] = {
{
.size = 128 * 1024,
@@ -95,6 +95,54 @@
},
{ /* NULL block */ }
};
+ static blob_partition_t partitions[] = {
+ {
+ .magic = BLOB_DEFAULT_PART_TABLE_MAGIC,
+ .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
+ }
+ };
GPDR0 |= GPIO25_LED;
@@ -104,6 +152,9 @@
serial_driver = &pxa_serial_driver;
flash_driver = &intel16_flash_driver;
led_driver = &csir_ims_led_driver;
+
+ default_partition_table = partitions;
+ flash_partition_table = (blob_partition_t *) 0x00000000;
}
__initlist (csir_ims_init_driver,INIT_LEVEL_DRIVER_SELECTION);
Index: gpio-pxa.S
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/gpio-pxa.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gpio-pxa.S 6 Aug 2003 23:00:52 -0000 1.1
+++ gpio-pxa.S 7 Aug 2003 19:31:00 -0000 1.2
@@ -8,41 +8,52 @@
*/
#ifdef HAVE_CONFIG_H
-#include <blob/config.h>
+# include <blob/config.h>
#endif
#include <blob/arch.h>
.text
-REG_BASE:
- .word GPDR0, GPDR1, GPDR2
- .word GPSR0, GPSR1, GPSR2
- .word GPCR0, GPCR1, GPCR2
- .word GAFR0_L, GAFR1_L, GAFR2_L
- .word GAFR0_U, GAFR1_U, GAFR2_U
-
-VALUE_BASE:
- .word GPDR0_VALUE, GPDR1_VALUE, GPDR2_VALUE
- .word GPSR0_VALUE, GPSR1_VALUE, GPSR2_VALUE
- .word GPCR0_VALUE, GPCR1_VALUE, GPCR2_VALUE
- .word GAFR0_L_VALUE, GAFR1_L_VALUE, GAFR2_L_VALUE
- .word GAFR0_U_VALUE, GAFR1_U_VALUE, GAFR2_U_VALUE
+.macro save, reg, value
+ ldr r1, =\reg
+ ldr r0, =\value
+ str r0, [r1]
+.endm
.globl gpiosetup
-.type gpiosetup, #function
gpiosetup:
- ldr r1, REG_BASE
- ldr r0, VALUE_BASE
- mov r2, r0
-0:
- ldr r3, [r0], #4
- str r3, [r1], #4
- cmp r1, r2
- blo 0b
+ save GPSR0, GPSR0_VALUE
+ save GPSR1, GPSR1_VALUE
+ save GPSR2, GPSR2_VALUE
+
+ save GPCR0, GPCR0_VALUE
+ save GPCR1, GPCR1_VALUE
+ save GPCR2, GPCR2_VALUE
+
+#if 0
+ save GRER0, GRER0_VALUE
+ save GRER1, GRER1_VALUE
+ save GRER2, GRER2_VALUE
+
+ save GFER0, GFER0_VALUE
+ save GFER1, GFER1_VALUE
+ save GFER2, GFER2_VALUE
+#endif
+
+ save GPDR0, GPDR0_VALUE
+ save GPDR1, GPDR1_VALUE
+ save GPDR2, GPDR2_VALUE
+
+ save GAFR0_L, GAFR0_L_VALUE
+ save GAFR0_U, GAFR0_U_VALUE
+ save GAFR1_L, GAFR1_L_VALUE
+ save GAFR1_U, GAFR1_U_VALUE
+ save GAFR2_L, GAFR2_L_VALUE
+ save GAFR2_U, GAFR2_U_VALUE
ldr r1, =PSSR
- mov r0, #(PSSR_RDH | PSSR_PH)
+ mov r0, #PSSR_RDH
str r0, [r1]
mov pc, lr
Index: lart.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/lart.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- lart.c 13 Feb 2003 01:10:53 -0000 1.9
+++ lart.c 7 Aug 2003 19:31:00 -0000 1.10
@@ -80,7 +80,7 @@
next: sizeof(blob_partition_t),
offset: PARAM_FLASH_BASE,
size: PARAM_FLASH_LEN,
- name: "parameters",
+ name: "param",
flags: BLOB_PART_FLAG_PTABLE
},
{
Index: main.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/main.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- main.c 28 Jan 2003 03:36:36 -0000 1.52
+++ main.c 7 Aug 2003 19:31:00 -0000 1.53
@@ -692,7 +692,8 @@
static void *find_parameters(void)
{
- const blob_partition_t *p = pt_find_by_name("parameters");
+ const blob_partition_t *p = pt_find_by_name("param");
- return p ? pt_flash_start(p) : 0;
+ return p ? pt_flash_start(p) : NULL;
}
+
Index: partition.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/partition.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- partition.c 28 Jan 2003 03:38:48 -0000 1.9
+++ partition.c 7 Aug 2003 19:31:01 -0000 1.10
@@ -219,7 +219,7 @@
t->size, t->offset, t->size, t->name);
if(t->flags & BLOB_PART_FLAG_PTABLE)
- printf(" contains partition table\n");
+ printf(" contains parameter blocks\n");
if(t->mem_base)
printf(" %sload at 0x%08x\n",
Index: start-pxa.S
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/start-pxa.S,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- start-pxa.S 6 Aug 2003 22:55:41 -0000 1.2
+++ start-pxa.S 7 Aug 2003 19:31:01 -0000 1.3
@@ -49,6 +49,7 @@
str r1, [r0]
real_reset:
+ bl gpiosetup
bl ledsetup
bl memsetup
bl normal_boot
Index: start-sa11x0.S
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/start-sa11x0.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- start-sa11x0.S 6 Aug 2003 22:55:41 -0000 1.6
+++ start-sa11x0.S 7 Aug 2003 19:31:01 -0000 1.7
@@ -120,9 +120,6 @@
real_reset:
- /* init GPIOs */
- bl gpiosetup
-
/* init LED */
bl ledinit
|