Skip to contentSkip to conversation

Add Apollon (OMAP24xx) board support

PATCH In review Kyungmin Park 2 participants 2 messages Jul 23, 2008 – Jul 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add Apollon (OMAP24xx) board support

Add apollon (OMAP24xx) board support
Also fix some GPMC offset handling

---

hw/boards.h +1 -0
index 22ac332..7043ea7 100644
@@ -88,6 +88,7 @@ extern QEMUMachine palmte_machine;
 /* nseries.c */
 extern QEMUMachine n800_machine;
 extern QEMUMachine n810_machine;
+extern QEMUMachine apollon_machine;
 
 /* gumstix.c */
 extern QEMUMachine connex_machine;
hw/nseries.c +39 -0
index 5e9d8f7..98c5a68 100644
@@ -31,6 +31,7 @@
 #include "devices.h"
 #include "flash.h"
 #include "hw.h"
+#include "net.h"
 
 /* Nokia N8x0 support */
 struct n800_s {
@@ -1312,6 +1313,12 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
        will set the size once configured, so this just sets an initial
        size until the guest activates the display.  */
     dpy_resize(ds, 800, 480);
+
+    if (model == 801) {
+        /* Interrupt line of NIC is connected to GPIO line 74 */
+        smc91c111_init(&nd_table[0], 0x08000300,
+                   omap2_gpio_in_get(s->cpu->gpif, 74)[0]);
+    }
 }
 
 static struct arm_boot_info n800_binfo = {
@@ -1333,6 +1340,14 @@ static struct arm_boot_info n810_binfo = {
     .atag_board = n810_atag_setup,
 };
 
+static struct arm_boot_info apollon_binfo = {
+    .loader_start = OMAP2_Q2_BASE,
+    /* Actually two chips of 0x4000000 bytes each */
+    .ram_size = 0x08000000,
+    .board_id = 0x397,
+    .atag_board = n800_atag_setup,
+};
+
 static void n800_init(ram_addr_t ram_size, int vga_ram_size,
                 const char *boot_device, DisplayState *ds,
                 const char *kernel_filename, const char *kernel_cmdline,
@@ -1353,6 +1368,23 @@ static void n810_init(ram_addr_t ram_size, int vga_ram_size,
                     cpu_model, &n810_binfo, 810);
 }
 
+static void apollon_init(ram_addr_t ram_size, int vga_ram_size,
+                const char *boot_device, DisplayState *ds,
+                const char *kernel_filename, const char *kernel_cmdline,
+                const char *initrd_filename, const char *cpu_model)
+{
+    uint32_t config7;
+
+    n8x0_init(ram_size, boot_device, ds,
+                    kernel_filename, kernel_cmdline, initrd_filename,
+                    cpu_model, &apollon_binfo, 801);
+
+    /* Set GPMC1 for ethernet at apollon */
+    config7 = 0x00000F40 | (0x08000000 >> 24);
+    cpu_physical_memory_write(0x6800a0a8,		/* GPMC_CONFIG7_1 */
+                    (void *) &config7, sizeof(config7));
+}
+
 QEMUMachine n800_machine = {
     "n800",
     "Nokia N800 tablet aka. RX-34 (OMAP2420)",
@@ -1366,3 +1398,10 @@ QEMUMachine n810_machine = {
     n810_init,
     (0x08000000 + 0x00010000 + OMAP242X_SRAM_SIZE) | RAMSIZE_FIXED,
 };
+
+QEMUMachine apollon_machine = {
+    "apollon",
+    "Samsung Apollon (OMAP2420)",
+    apollon_init,
+    (0x08000000 + 0x00010000 + OMAP242X_SRAM_SIZE) | RAMSIZE_FIXED,
+};
hw/omap2.c +58 -3

97 lines not on this page · raw message

target-arm/machine.c +1 -0
index 42ff584..c92bb15 100644
@@ -14,6 +14,7 @@ void register_machines(void)
     qemu_register_machine(&palmte_machine);
     qemu_register_machine(&n800_machine);
     qemu_register_machine(&n810_machine);
+    qemu_register_machine(&apollon_machine);
     qemu_register_machine(&lm3s811evb_machine);
     qemu_register_machine(&lm3s6965evb_machine);
     qemu_register_machine(&connex_machine);
#1 lore raw

Hi,

Am 24.07.2008 um 01:34 schrieb Kyungmin Park:

Quoted 4 lines

Add apollon (OMAP24xx) board support
Also fix some GPMC offset handling

You should probably also update the documentation to reflect the board availability.

Andreas