| 1 | #include <qi.h> |
| 2 | #include <neo_smdk6410.h> |
| 3 | #include <serial-s3c64xx.h> |
| 4 | |
| 5 | #define SMDK6410_DEBUG_UART 0 |
| 6 | |
| 7 | extern const struct board_variant const * get_board_variant_smdk6410(void); |
| 8 | |
| 9 | int is_this_board_smdk6410(void) |
| 10 | { |
| 11 | /* FIXME: find something smdk6410 specific */ |
| 12 | return 1; |
| 13 | } |
| 14 | |
| 15 | static void putc_smdk6410(char c) |
| 16 | { |
| 17 | serial_putc_s3c64xx(SMDK6410_DEBUG_UART, c); |
| 18 | } |
| 19 | |
| 20 | int sd_card_init_smdk6410(void) |
| 21 | { |
| 22 | extern int s3c6410_mmc_init(int verbose); |
| 23 | |
| 24 | return s3c6410_mmc_init(1); |
| 25 | } |
| 26 | |
| 27 | int sd_card_block_read_smdk6410(unsigned char * buf, unsigned long start512, |
| 28 | int blocks512) |
| 29 | { |
| 30 | unsigned long s3c6410_mmc_bread(int dev_num, unsigned long blknr, |
| 31 | unsigned long blkcnt, void *dst); |
| 32 | |
| 33 | return s3c6410_mmc_bread(0, start512, blocks512, buf); |
| 34 | } |
| 35 | |
| 36 | /* |
| 37 | * our API for bootloader on this machine |
| 38 | */ |
| 39 | const struct board_api board_api_smdk6410 = { |
| 40 | .name = "SMDK6410", |
| 41 | .linux_machine_id = 1866 /* 1626 */, |
| 42 | .linux_mem_start = 0x50000000, |
| 43 | .linux_mem_size = (128 * 1024 * 1024), |
| 44 | .linux_tag_placement = 0x50000000 + 0x100, |
| 45 | .get_board_variant = get_board_variant_smdk6410, |
| 46 | .is_this_board = is_this_board_smdk6410, |
| 47 | .putc = putc_smdk6410, |
| 48 | .commandline_board = "console=ttySAC0,115200 " |
| 49 | "loglevel=3 " |
| 50 | "init=/bin/sh ", |
| 51 | .commandline_board_debug = " loglevel=8", |
| 52 | .noboot = "boot/noboot-SDMK6410", |
| 53 | .append = "boot/append-SMDK6410", |
| 54 | .kernel_source = { |
| 55 | [0] = { |
| 56 | .name = "SD Card rootfs", |
| 57 | .block_read = sd_card_block_read_smdk6410, |
| 58 | .filesystem = FS_EXT2, |
| 59 | .partition_index = 2, |
| 60 | .filepath = "boot/uImage-SMDK6410.bin", |
| 61 | .commandline_append = "root=/dev/mmcblk0p2 " |
| 62 | }, |
| 63 | [1] = { |
| 64 | .name = "SD Card backup rootfs", |
| 65 | .block_read = sd_card_block_read_smdk6410, |
| 66 | .filesystem = FS_EXT2, |
| 67 | .partition_index = 3, |
| 68 | .filepath = "boot/uImage-SMDK6410.bin", |
| 69 | .commandline_append = "root=/dev/mmcblk0p3 " |
| 70 | }, |
| 71 | }, |
| 72 | }; |
| 73 | |
| 74 | |