1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-29 15:45:20 +02:00

qi-rename-gta03-3d7k.patch

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2009-03-02 18:51:08 +00:00 committed by Andy Green
parent 67d668d781
commit c53df5fb28
6 changed files with 48 additions and 49 deletions

View File

@ -22,7 +22,7 @@
#ifndef __ASM_MODE__ #ifndef __ASM_MODE__
#include <qi.h> #include <qi.h>
extern const struct board_api board_api_gta03; extern const struct board_api board_api_om_3d7k;
#endif #endif
#define TEXT_BASE_GTA03 0x53000000 #define TEXT_BASE_OM_3D7K 0x53000000

View File

@ -27,7 +27,6 @@
#include <qi.h> #include <qi.h>
#include "nand_read.h" #include "nand_read.h"
#include <neo_gta02.h> #include <neo_gta02.h>
#include <neo_gta03.h>
#define stringify2(s) stringify1(s) #define stringify2(s) stringify1(s)
#define stringify1(s) #s #define stringify1(s) #s

View File

@ -1,34 +1,34 @@
#include <qi.h> #include <qi.h>
#include <neo_gta03.h> #include <neo_om_3d7k.h>
#include <s3c6410.h> #include <s3c6410.h>
#include <serial-s3c64xx.h> #include <serial-s3c64xx.h>
#define GTA03_DEBUG_UART 3 #define OM_3D7K_DEBUG_UART 3
/* out of steppingstone */ /* out of steppingstone */
extern const struct board_variant const * get_board_variant_gta03(void); extern const struct board_variant const * get_board_variant_om_3d7k(void);
extern void port_init_gta03(void); extern void port_init_om_3d7k(void);
int is_this_board_gta03(void) int is_this_board_om_3d7k(void)
{ {
/* FIXME: find something gta03 specific */ /* FIXME: find something om_3d7k specific */
return 1; return 1;
} }
static void putc_gta03(char c) static void putc_om_3d7k(char c)
{ {
serial_putc_s3c64xx(GTA03_DEBUG_UART, c); serial_putc_s3c64xx(OM_3D7K_DEBUG_UART, c);
} }
int sd_card_init_gta03(void) int sd_card_init_om_3d7k(void)
{ {
extern int s3c6410_mmc_init(int verbose); extern int s3c6410_mmc_init(int verbose);
return s3c6410_mmc_init(1); return s3c6410_mmc_init(1);
} }
int sd_card_block_read_gta03(unsigned char * buf, unsigned long start512, int sd_card_block_read_om_3d7k(unsigned char * buf, unsigned long start512,
int blocks512) int blocks512)
{ {
unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, unsigned long blkcnt, unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, unsigned long blkcnt,
@ -47,14 +47,14 @@ unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, unsigned long
* "root=/dev/ram ramdisk_size=6000000" * "root=/dev/ram ramdisk_size=6000000"
*/ */
static u8 get_ui_keys_gta03(void) static u8 get_ui_keys_om_3d7k(void)
{ {
u8 keys; u8 keys;
u8 ret; u8 ret;
static u8 old_keys = 0; /* previous state for debounce */ static u8 old_keys = 0; /* previous state for debounce */
static u8 old_ret = 0; /* previous debounced output for edge detect */ static u8 old_ret = 0; /* previous debounced output for edge detect */
/* GPN1 is MINUS on GTA03, map to UI_ACTION_ADD_DEBUG, down = 1 */ /* GPN1 is MINUS on OM_3D7K, map to UI_ACTION_ADD_DEBUG, down = 1 */
keys = !!(__REG(GPMDAT) & (1 << 1)); keys = !!(__REG(GPMDAT) & (1 << 1));
if (keys == old_keys) if (keys == old_keys)
@ -72,19 +72,19 @@ static u8 get_ui_keys_gta03(void)
return ret; return ret;
} }
const struct board_api board_api_gta03 = { const struct board_api board_api_om_3d7k = {
.name = "GTA03", .name = "OM_3D7K",
.linux_machine_id = 1866, .linux_machine_id = 2120,
.linux_mem_start = 0x50000000, .linux_mem_start = 0x50000000,
.linux_mem_size = (128 * 1024 * 1024), .linux_mem_size = (128 * 1024 * 1024),
.linux_tag_placement = 0x50000000 + 0x100, .linux_tag_placement = 0x50000000 + 0x100,
.get_board_variant = get_board_variant_gta03, .get_board_variant = get_board_variant_om_3d7k,
.is_this_board = is_this_board_gta03, .is_this_board = is_this_board_om_3d7k,
.port_init = port_init_gta03, .port_init = port_init_om_3d7k,
.putc = putc_gta03, .putc = putc_om_3d7k,
.noboot = "boot/noboot-GTA03", .noboot = "boot/noboot-OM_3D7K",
.append = "boot/append-GTA03", .append = "boot/append-OM_3D7K",
.get_ui_keys = get_ui_keys_gta03, .get_ui_keys = get_ui_keys_om_3d7k,
.commandline_board = "console=tty0 " \ .commandline_board = "console=tty0 " \
"console=ttySAC3,115200 " \ "console=ttySAC3,115200 " \
"init=/bin/sh " \ "init=/bin/sh " \
@ -95,18 +95,18 @@ const struct board_api board_api_gta03 = {
.kernel_source = { .kernel_source = {
[0] = { [0] = {
.name = "SD Card rootfs", .name = "SD Card rootfs",
.block_read = sd_card_block_read_gta03, .block_read = sd_card_block_read_om_3d7k,
.filesystem = FS_EXT2, .filesystem = FS_EXT2,
.partition_index = 2, .partition_index = 2,
.filepath = "boot/uImage-GTA03.bin", .filepath = "boot/uImage-OM_3D7K.bin",
.commandline_append = "root=/dev/mmcblk0p2 ", .commandline_append = "root=/dev/mmcblk0p2 ",
}, },
[1] = { [1] = {
.name = "SD Card backup rootfs", .name = "SD Card backup rootfs",
.block_read = sd_card_block_read_gta03, .block_read = sd_card_block_read_om_3d7k,
.filesystem = FS_EXT2, .filesystem = FS_EXT2,
.partition_index = 3, .partition_index = 3,
.filepath = "boot/uImage-GTA03.bin", .filepath = "boot/uImage-OM_3D7K.bin",
.commandline_append = "root=/dev/mmcblk0p3 ", .commandline_append = "root=/dev/mmcblk0p3 ",
}, },
}, },

View File

@ -1,5 +1,5 @@
#include <qi.h> #include <qi.h>
#include <neo_gta03.h> #include <neo_om_3d7k.h>
#include <s3c6410.h> #include <s3c6410.h>
#include <serial-s3c64xx.h> #include <serial-s3c64xx.h>
#include <i2c-bitbang-s3c6410.h> #include <i2c-bitbang-s3c6410.h>
@ -7,7 +7,7 @@
#define PCF50633_I2C_ADS 0x73 #define PCF50633_I2C_ADS 0x73
const struct pcf50633_init gta03_pcf50633_init[] = { const struct pcf50633_init om_3d7k_pcf50633_init[] = {
{ PCF50633_REG_OOCWAKE, 0xd3 }, /* wake from ONKEY,EXTON!,RTC,USB,ADP */ { PCF50633_REG_OOCWAKE, 0xd3 }, /* wake from ONKEY,EXTON!,RTC,USB,ADP */
{ PCF50633_REG_OOCTIM1, 0xaa }, /* debounce 14ms everything */ { PCF50633_REG_OOCTIM1, 0xaa }, /* debounce 14ms everything */
@ -50,40 +50,40 @@ const struct pcf50633_init gta03_pcf50633_init[] = {
static const struct board_variant board_variants[] = { static const struct board_variant board_variants[] = {
[0] = { [0] = {
.name = "GTA03 unknown", .name = "OM 3D7K unknown",
.machine_revision = 0 .machine_revision = 0
}, },
[1] = { [1] = {
.name = "GTA03 A1", .name = "OM 3D7K A1",
.machine_revision = 1 .machine_revision = 1
}, },
[2] = { [2] = {
.name = "GTA03 A2", .name = "OM 3D7K A2",
.machine_revision = 2 .machine_revision = 2
}, },
[3] = { [3] = {
.name = "GTA03 A3", .name = "OM 3D7K A3",
.machine_revision = 3 .machine_revision = 3
}, },
[4] = { [4] = {
.name = "GTA03 A4", .name = "OM 3D7K A4",
.machine_revision = 4 .machine_revision = 4
}, },
[5] = { [5] = {
.name = "GTA03 A5", .name = "OM 3D7K A5",
.machine_revision = 5 .machine_revision = 5
}, },
[6] = { [6] = {
.name = "GTA03 A6", .name = "OM 3D7K A6",
.machine_revision = 6 .machine_revision = 6
}, },
[7] = { [7] = {
.name = "GTA03 A7", .name = "OM 3D7K A7",
.machine_revision = 7 .machine_revision = 7
} }
}; };
void port_init_gta03(void) void port_init_om_3d7k(void)
{ {
int n; int n;
@ -821,14 +821,14 @@ void port_init_gta03(void)
/* /*
* We have to talk to the PMU a little bit * We have to talk to the PMU a little bit
*/ */
for (n = 0; n < ARRAY_SIZE(gta03_pcf50633_init); n++) for (n = 0; n < ARRAY_SIZE(om_3d7k_pcf50633_init); n++)
i2c_write_sync(&bb_s3c6410, PCF50633_I2C_ADS, i2c_write_sync(&bb_s3c6410, PCF50633_I2C_ADS,
gta03_pcf50633_init[n].index, om_3d7k_pcf50633_init[n].index,
gta03_pcf50633_init[n].value); om_3d7k_pcf50633_init[n].value);
} }
int gta03_get_pcb_revision(void) int om_3d7k_get_pcb_revision(void)
{ {
u32 v = __REG(GPIDAT); u32 v = __REG(GPIDAT);
/* /*
@ -847,8 +847,8 @@ int gta03_get_pcb_revision(void)
); );
} }
const struct board_variant const * get_board_variant_gta03(void) const struct board_variant const * get_board_variant_om_3d7k(void)
{ {
return &board_variants[gta03_get_pcb_revision()]; return &board_variants[om_3d7k_get_pcb_revision()];
} }

View File

@ -45,7 +45,7 @@ SECTIONS
src/cpu/s3c6410/start.o (.text .rodata* .data .bss) src/cpu/s3c6410/start.o (.text .rodata* .data .bss)
src/cpu/s3c6410/start_qi.o (.text .rodata* .data .bss) src/cpu/s3c6410/start_qi.o (.text .rodata* .data .bss)
src/cpu/s3c6410/serial-s3c64xx.o (.text .rodata* .data .bss) src/cpu/s3c6410/serial-s3c64xx.o (.text .rodata* .data .bss)
src/cpu/s3c6410/gta03-steppingstone.o (.text .rodata* .data .bss) src/cpu/s3c6410/om_3d7k-steppingstone.o (.text .rodata* .data .bss)
src/cpu/s3c6410/smdk6410-steppingstone.o (.text .rodata* .data .bss) src/cpu/s3c6410/smdk6410-steppingstone.o (.text .rodata* .data .bss)
src/cpu/s3c6410/hs_mmc.o (.text .rodata* .data .bss) src/cpu/s3c6410/hs_mmc.o (.text .rodata* .data .bss)
src/utils.o (.text .rodata* .data .bss) src/utils.o (.text .rodata* .data .bss)

View File

@ -25,7 +25,7 @@
#include <qi.h> #include <qi.h>
#include <neo_gta03.h> #include <neo_om_3d7k.h>
#include <neo_smdk6410.h> #include <neo_smdk6410.h>
#define stringify2(s) stringify1(s) #define stringify2(s) stringify1(s)
@ -34,7 +34,7 @@
extern void bootloader_second_phase(void); extern void bootloader_second_phase(void);
const struct board_api *boards[] = { const struct board_api *boards[] = {
&board_api_gta03, &board_api_om_3d7k,
&board_api_smdk6410, &board_api_smdk6410,
NULL /* always last */ NULL /* always last */
}; };