summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/dataflash.c14
-rw-r--r--drivers/serial/mcfuart.c4
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 8247aa0..a092dc6 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -54,6 +54,17 @@ int AT91F_DataflashInit (void)
&dataflash_info[i].Desc);
switch (dfcode) {
+ case AT45DB021:
+ dataflash_info[i].Device.pages_number = 1024;
+ dataflash_info[i].Device.pages_size = 263;
+ dataflash_info[i].Device.page_offset = 9;
+ dataflash_info[i].Device.byte_mask = 0x300;
+ dataflash_info[i].Device.cs = cs[i].cs;
+ dataflash_info[i].Desc.DataFlash_state = IDLE;
+ dataflash_info[i].logical_address = cs[i].addr;
+ dataflash_info[i].id = dfcode;
+ found[i] += dfcode;;
+ break;
case AT45DB161:
dataflash_info[i].Device.pages_number = 4096;
dataflash_info[i].Device.pages_size = 528;
@@ -178,6 +189,9 @@ void dataflash_print_info (void)
if (dataflash_info[i].id != 0) {
printf("DataFlash:");
switch (dataflash_info[i].id) {
+ case AT45DB021:
+ printf("AT45DB021\n");
+ break;
case AT45DB161:
printf("AT45DB161\n");
break;
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 88f3eb1..5eb4f45 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -63,8 +63,8 @@ int serial_init(void)
uart->umr = UART_UMR_SB_STOP_BITS_1;
/* Setting up BaudRate */
- counter = (u32) (gd->bus_clk / (gd->baudrate));
- counter >>= 5;
+ counter = (u32) ((gd->bus_clk / 32) + (gd->baudrate / 2));
+ counter = counter / gd->baudrate;
/* write to CTUR: divide counter upper byte */
uart->ubg1 = (u8) ((counter & 0xff00) >> 8);