1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-12-23 15:51:45 +02:00

qi-split-boards-smdk6410-gta03.patch

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:42 +00:00 committed by Andy Green
parent fe71796cc1
commit 72f081daa8
7 changed files with 127 additions and 25 deletions

View File

@ -0,0 +1,6 @@
#ifndef __ASM_MODE__
#include <qi.h>
extern const struct board_api board_api_smdk6410;
#endif
#define TEXT_BASE_SMDK6410 0x53000000

View File

@ -0,0 +1,6 @@
#ifndef __ASM_MODE__
#include <qi.h>
extern const struct board_api board_api_smdk6410;
#endif
#define TEXT_BASE_SMDK6410 0x53000000

View File

@ -5,17 +5,13 @@
//#include <i2c-bitbang-s3c24xx.h>
#include <pcf50633.h>
#define GTA03_DEBUG_UART 0
#define GTA03_DEBUG_UART 3
#define PCF50633_I2C_ADS 0x73
static const struct board_variant board_variants[] = {
[0] = {
.name = "SMDK",
.machine_revision = 0,
},
[1] = {
.name = "GTA03 EVT1",
.machine_revision = 1
}
@ -192,7 +188,7 @@ unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, unsigned long
*/
const struct board_api board_api_gta03 = {
.name = "GTA03",
.linux_machine_id = 1626 /*1866*/,
.linux_machine_id = 1866,
.linux_mem_start = 0x50000000,
.linux_mem_size = (128 * 1024 * 1024),
.linux_tag_placement = 0x50000000 + 0x100,
@ -208,8 +204,9 @@ const struct board_api board_api_gta03 = {
.partition_index = 2,
.filepath = "boot/uImage.bin",
.initramfs_filepath = "boot/initramfs.gz",
.commandline = "console=ttySAC0,115200 " \
"loglevel=8 init=/bin/sh root=/dev/ram ramdisk_size=6000000"
.commandline = "console=ttySAC3,115200 " \
"loglevel=8 init=/bin/sh " \
"root=/dev/ram ramdisk_size=6000000"
},
[1] = {
.name = "SD Card backup rootfs",
@ -218,7 +215,7 @@ const struct board_api board_api_gta03 = {
.partition_index = 3,
.filepath = "boot/uImage.bin",
.initramfs_filepath = "boot/initramfs.gz",
.commandline = "console=ttySAC0,115200 " \
.commandline = "console=ttySAC3,115200 " \
"loglevel=8 init=/bin/sh "
}, },
};

View File

@ -46,6 +46,7 @@ SECTIONS
src/cpu/s3c6410/start_qi.o (.text .rodata* .data .bss)
src/cpu/s3c6410/serial-s3c64xx.o (.text .rodata* .data .bss)
src/cpu/s3c6410/gta03.o (.text .rodata* .data .bss)
src/cpu/s3c6410/smdk6410.o (.text .rodata* .data .bss)
src/cpu/s3c6410/hs_mmc.o (.text .rodata* .data .bss)
src/utils.o (.text .rodata* .data .bss)
src/memory-test.o (.text .rodata* .data .bss)

View File

@ -1,6 +1,6 @@
/*
* (C) Copyright 2007 OpenMoko, Inc.
* Author: xiangfu liu <xiangfu@openmoko.org>
* Author: Andy Green <andy@openmoko.com>
*
* Configuation settings for the FIC Neo GTA02 Linux GSM phone
*
@ -28,20 +28,11 @@
*/
void serial_putc_s3c64xx(const int uart, const char c)
{
switch(uart)
{
case 0:
while (!( UTRSTAT0_REG & 0x2 ))
;
UTXH0_REG = c;
break;
case 1:
while (!( UTRSTAT1_REG & 0x2))
;
UTXH1_REG = c;
break;
if (uart >= 4)
return;
default:
break;
}
while (!(__REG(0x7F005000 + UTRSTAT_OFFSET + (uart << 10)) & 0x2))
;
__REG(0x7F005000 + UTXH_OFFSET + (uart << 10)) = c;
}

View File

@ -0,0 +1,99 @@
#include <qi.h>
#include <neo_smdk6410.h>
#include <serial-s3c64xx.h>
#define SMDK6410_DEBUG_UART 0
static const struct board_variant board_variants[] = {
[0] = {
.name = "SMDK",
.machine_revision = 0,
},
};
void port_init_smdk6410(void)
{
}
/**
* returns PCB revision information in b0, d8, d9
* SMDK6410 EVB returns 0x000
* SMDK6410 returns 0x001
*/
int smdk6410_get_pcb_revision(void)
{
return 0;
}
const struct board_variant const * get_board_variant_smdk6410(void)
{
return &board_variants[smdk6410_get_pcb_revision()];
}
int is_this_board_smdk6410(void)
{
/* FIXME: find something smdk6410 specific */
return 1;
}
static __attribute__ (( section (".steppingstone") )) void putc_smdk6410(char c)
{
serial_putc_s3c64xx(SMDK6410_DEBUG_UART, c);
}
int sd_card_init_smdk6410(void)
{
extern int s3c6410_mmc_init(int verbose);
return s3c6410_mmc_init(1);
}
int sd_card_block_read_smdk6410(unsigned char * buf, unsigned long start512,
int blocks512)
{
unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, unsigned long blkcnt,
void *dst);
return s3c6410_mmc_bread(0, start512, blocks512, buf);
}
/*
* our API for bootloader on this machine
*/
const struct board_api board_api_smdk6410 = {
.name = "SMDK6410",
.linux_machine_id = 1626,
.linux_mem_start = 0x50000000,
.linux_mem_size = (128 * 1024 * 1024),
.linux_tag_placement = 0x50000000 + 0x100,
.get_board_variant = get_board_variant_smdk6410,
.is_this_board = is_this_board_smdk6410,
.port_init = port_init_smdk6410,
.putc = putc_smdk6410,
.kernel_source = {
[0] = {
.name = "SD Card rootfs",
.block_read = sd_card_block_read_smdk6410,
.filesystem = FS_EXT2,
.partition_index = 2,
.filepath = "boot/uImage.bin",
.initramfs_filepath = "boot/initramfs.gz",
.commandline = "console=ttySAC0,115200 " \
"loglevel=8 init=/bin/sh " \
" root=/dev/ram ramdisk_size=6000000"
},
[1] = {
.name = "SD Card backup rootfs",
.block_read = sd_card_block_read_smdk6410,
.filesystem = FS_EXT2,
.partition_index = 3,
.filepath = "boot/uImage.bin",
.initramfs_filepath = "boot/initramfs.gz",
.commandline = "console=ttySAC0,115200 " \
"loglevel=8 init=/bin/sh "
}, },
};

View File

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