Add Siemens SX1 Machine support
Hi,
The folowing patchset add support for the Siemens SX1
This work is based on the linux-on-SX1.sourceforge.net project
Supported Machine
Siemens SX1 Cellphone V1
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 16 MB at 0x00000000
- Application flash 8 MB at 0x04000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
- 1 USB
Siemens SX1 Cellphone V2
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 32 MB at 0x00000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
- 1 USB
U-Boot (mainline) and Linux kernel (2.6.26) tested
For U-Boot in my next branch
http://git.denx.de/?p=u-boot/u-boot-arm.git;a=shortlog;h=refs/heads/next
Will be merge during merge window
Best Regards,
J.
PATCH 1/4 pflash_cfi01: add Single Byte Program
--- hw/pflash_cfi01.c | 87 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 53 insertions(+), 34 deletions(-)
hw/pflash_cfi01.c +53 -34
@@ -195,6 +195,47 @@ static void pflash_update(pflash_t *pfl, int offset, } } +static void inline pflash_data_write (pflash_t *pfl,target_ulong offset, +uint32_t value,int width) +{ +uint8_t *p = pfl->storage; + +DPRINTF ("%s: block write offset " TARGET_FMT_lx +" value %x counter " TARGET_FMT_lx"\n" , + __func__, offset, value, pfl->counter); +switch (width) { +case 1 : + p[offset] = value; +pflash_update (pfl, offset,1 ); +break ; +case 2 : +#if defined(TARGET_WORDS_BIGENDIAN ) + p[offset] = value >>8 ; + p[offset +1 ] = value; +#else + p[offset] = value; + p[offset +1 ] = value >>8 ; +#endif +pflash_update (pfl, offset,2 ); +break ; +case 4 : +#if defined(TARGET_WORDS_BIGENDIAN ) + p[offset] = value >>24 ; + p[offset +1 ] = value >>16 ; + p[offset +2 ] = value >>8 ; + p[offset +3 ] = value; +#else + p[offset] = value; + p[offset +1 ] = value >>8 ; + p[offset +2 ] = value >>16 ; + p[offset +3 ] = value >>24 ; +#endif +pflash_update (pfl, offset,4 ); +break ; + } + +} +static void pflash_write (pflash_t *pfl,target_ulong offset,uint32_t value,int width) {
@@ -223,6 +264,10 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,switch (cmd) {case 0x00 :/* ??? */ goto reset_flash; +case 0x10 :/* Single Byte Program */ +case 0x40 :/* Single Byte Program */ +DPRINTF (stderr,"%s: Single Byte Program\n" , __func__); +break ;case 0x20 :/* Block erase */ p = pfl->storage; offset &= ~(pfl->sector_len -1 );
@@ -264,6 +309,13 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,return ;case 1 :switch (pfl->cmd) { +case 0x10 :/* Single Byte Program */ +case 0x40 :/* Single Byte Program */ +DPRINTF ("%s: Single Byte Program\n" , __func__); +pflash_data_write (pfl, offset, value, width); + pfl->status |=0x80 ;/* Ready! */ + pfl->wcycle =0 ; +break ;case 0x20 :/* Block erase */ case 0x28 :if (cmd ==0xd0 ) {/* confirm */
@@ -308,40 +360,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,case 2 :switch (pfl->cmd) {case 0xe8 :/* Block write */ - p = pfl->storage; -DPRINTF ("%s: block write offset " TARGET_FMT_lx -" value %x counter " TARGET_FMT_lx"\n" , - __func__, offset, value, pfl->counter); -switch (width) { -case 1 : - p[offset] = value; -pflash_update (pfl, offset,1 ); -break ; -case 2 : -#if defined(TARGET_WORDS_BIGENDIAN ) - p[offset] = value >>8 ; - p[offset +1 ] = value; -#else - p[offset] = value; - p[offset +1 ] = value >>8 ; -#endif -pflash_update (pfl, offset,2 ); -break ; -case 4 : -#if defined(TARGET_WORDS_BIGENDIAN ) - p[offset] = value >>24 ; - p[offset +1 ] = value >>16 ; - p[offset +2 ] = value >>8 ; - p[offset +3 ] = value; -#else - p[offset] = value; - p[offset +1 ] = value >>8 ; - p[offset +2 ] = value >>16 ; - p[offset +3 ] = value >>24 ; -#endif -pflash_update (pfl, offset,4 ); -break ; - } +pflash_data_write (pfl, offset, value, width); pfl->status |=0x80 ;
Signature · 1 line
1.5.6.5
PATCH 2/4 omap1: add OSC_12M_SEL Register support
--- hw/omap1.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
hw/omap1.c +4 -0
@@ -2038,6 +2038,8 @@ static uint32_t omap_uart_read(void *opaque, target_phys_addr_t addr)return 0x0 ;case 0x48 :/* EBLR */ return s->eblr; +case 0x4C :/* OSC_12M_SEL */ +return 0 ;case 0x50 :/* MVR */ return 0x30 ;case 0x54 :/* SYSC */
@@ -2073,6 +2075,8 @@ static void omap_uart_write(void *opaque, target_phys_addr_t addr,case 0x48 :/* EBLR */ s->eblr = value &0xff ;break ; +case 0x4C :/* OSC_12M_SEL */ +break ;case 0x44 :/* SSR */ case 0x50 :/* MVR */ case 0x58 :/* SYSS */
Signature · 1 line
1.5.6.5
PATCH 3/4 omap1: fix uart3 init
--- hw/omap1.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/omap1.c +1 -1
@@ -4778,7 +4778,7 @@ struct omap_mpu_state_s *omap310_mpu_init(unsigned long sdram_size,omap_findclk (s,"uart2_ck" ), s->drq[OMAP_DMA_UART2_TX ], s->drq[OMAP_DMA_UART2_RX ], serial_hds[0] ? serial_hds[1] : 0); - s->uart[2] = omap_uart_init(0xe1019800, s->irq[0][OMAP_INT_UART3], + s->uart[2] = omap_uart_init(0xfffb9800, s->irq[0][OMAP_INT_UART3], omap_findclk(s, "uart3_ck"), omap_findclk(s, "uart3_ck"), s->drq[OMAP_DMA_UART3_TX], s->drq[OMAP_DMA_UART3_RX],
Signature · 1 line
1.5.6.5
PATCH 4/4 add Siemens SX1 Machine support
Siemens SX1 Cellphone V1
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 16 MB at 0x00000000
- Application flash 8 MB at 0x04000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
- 1 USB
Siemens SX1 Cellphone V2
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 32 MB at 0x00000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
- 1 USB
U-Boot (mainline) and Linux kernel (2.6.26) tested
--- Makefile.target | 2 +- hw/boards.h | 4 + hw/omap_sx1.c | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++ target-arm/machine.c | 2 + 4 files changed, 245 insertions(+), 1 deletions(-) create mode 100644 hw/omap_sx1.c
Makefile.target +1 -1
@@ -727,7 +727,7 @@ OBJS+= pflash_cfi01.o gumstix.o OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o OBJS+= omap2.o omap_dss.o soc_dma.o -OBJS+= palm.o tsc210x.o +OBJS+= omap_sx1.o palm.o tsc210x.o OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o OBJS+= tsc2005.o bt-hci-csr.o OBJS+= mst_fpga.o mainstone.o
hw/boards.h +4 -0
@@ -86,6 +86,10 @@ extern QEMUMachine spitzpda_machine;extern QEMUMachine borzoipda_machine;extern QEMUMachine terrierpda_machine; +/* omap_sx1.c */ +extern QEMUMachine sx1_machine_v1; +extern QEMUMachine sx1_machine_v2; +/* palm.c */ extern QEMUMachine palmte_machine;
hw/omap_sx1.c new file +238 -0
238 lines not on this page · raw message
target-arm/machine.c +2 -0
@@ -11,6 +11,8 @@ void register_machines(void)qemu_register_machine (&spitzpda_machine);qemu_register_machine (&borzoipda_machine);qemu_register_machine (&terrierpda_machine); +qemu_register_machine (&sx1_machine_v1); +qemu_register_machine (&sx1_machine_v2);qemu_register_machine (&palmte_machine);qemu_register_machine (&n800_machine);qemu_register_machine (&n810_machine);
Signature · 1 line
1.5.6.5
PATCH v2 4/4 add Siemens SX1 Machine support
Siemens SX1 Cellphone V1
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 16 MB at 0x00000000
- Application flash 8 MB at 0x04000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
Siemens SX1 Cellphone V2
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 32 MB at 0x00000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
U-Boot (mainline) and Linux kernel (2.6.26) tested
---
add qemu-doc
and fix QEMUMachine var name (invert between v1 and v2)
Best Regards,
J.
Makefile.target | 2 +- hw/boards.h | 4 + hw/omap_sx1.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++ qemu-doc.texi | 26 ++++++ target-arm/machine.c | 2 + 5 files changed, 269 insertions(+), 1 deletions(-) create mode 100644 hw/omap_sx1.c
Makefile.target +1 -1
@@ -727,7 +727,7 @@ OBJS+= pflash_cfi01.o gumstix.o OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o OBJS+= omap2.o omap_dss.o soc_dma.o -OBJS+= palm.o tsc210x.o +OBJS+= omap_sx1.o palm.o tsc210x.o OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o OBJS+= tsc2005.o bt-hci-csr.o OBJS+= mst_fpga.o mainstone.o
hw/boards.h +4 -0
@@ -86,6 +86,10 @@ extern QEMUMachine spitzpda_machine;extern QEMUMachine borzoipda_machine;extern QEMUMachine terrierpda_machine; +/* omap_sx1.c */ +extern QEMUMachine sx1_machine_v1; +extern QEMUMachine sx1_machine_v2; +/* palm.c */ extern QEMUMachine palmte_machine;
hw/omap_sx1.c new file +236 -0
236 lines not on this page · raw message
qemu-doc.texi +26 -0
@@ -2707,6 +2707,32 @@ Secure Digital card connected to OMAP MMC/SD host Three on-chip UARTs @end itemize +The Siemens SX1 models v1 and v2 (default) emulation with U-Boot and Linux +Mainline support. +The emlulaton includes the following elements: + + at itemize @minus + at item +Texas Instruments OMAP310 System-on-chip (ARM 925T core) + at item +ROM and RAM memories (ROM firmware image can be loaded with -pflash) +V1 +1 Flash of 16MB and 1 Flash of 8MB +V2 +1 Flash of 32MB + at item +On-chip LCD controller + at item +On-chip Real Time Clock + at item +TI TSC2102i touchscreen controller / analog-digital converter / Audio +CODEC, connected through MicroWire and I at math{^2}S busses + at item +Secure Digital card connected to OMAP MMC/SD host + at item +Three on-chip UARTs + at end itemize + Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48) emulation supports the following elements:
target-arm/machine.c +2 -0
@@ -11,6 +11,8 @@ void register_machines(void)qemu_register_machine (&spitzpda_machine);qemu_register_machine (&borzoipda_machine);qemu_register_machine (&terrierpda_machine); +qemu_register_machine (&sx1_machine_v1); +qemu_register_machine (&sx1_machine_v2);qemu_register_machine (&palmte_machine);qemu_register_machine (&n800_machine);qemu_register_machine (&n810_machine);
Signature · 1 line
1.5.6.5
PATCH v2 4/4 add Siemens SX1 Machine support
Dear Jean-Christophe PLAGNIOL-VILLARD,
Makefile.target
Quoted 42 lines · In message <[email protected]> you wrote:
Siemens SX1 Cellphone V1
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at0x10000000
- Boot flash 16 MB at0x00000000
- Application flash 8 MB at0x04000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTCSiemens SX1 Cellphone V2
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at0x10000000
- Boot flash 32 MB at0x00000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTCU-Boot (mainline) and Linux kernel (2.6.26) tested
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
add qemu-doc
and fix QEMUMachine var name (invert between v1 and v2)Best Regards,
J.Makefile.target | 2 +- hw/boards.h | 4 + hw/omap_sx1.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++ qemu-doc.texi | 26 ++++++ target-arm/machine.c | 2 + 5 files changed, 269 insertions(+), 1 deletions(-) create mode 100644 hw/omap_sx1.cMakefile.target +0
-0
What's Makefile.target ? There is no such file in mainline.
[And I don't want to have any file by such a name either.]
hw/boards.h
Quoted 9 lines
OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o OBJS+= omap2.o omap_dss.o soc_dma.o
Makefile.target +1
-1-OBJS+= palm.o tsc210x.o +OBJS+= omap_sx1.o palm.o tsc210x.o OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o OBJS+= tsc2005.o bt-hci-csr.o OBJS+= mst_fpga.o mainstone.ohw/boards.h +0
-0
What's hw/ ? There is no such firectory in mainline.
hw/omap_sx1.c
Quoted 5 lines
hw/omap_sx1.c new file +0
-0
And, as you certainly know, the SX1 is already supported by the code in board/sx1/ ?
Are you really sure this patch was for the U-Boot mailing list?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Lead me not into temptation... I can find it myself.
PATCH v2 4/4 add Siemens SX1 Machine support
Quoted 3 lines
Are you really sure this patch was for the U-Boot mailing list?
no sorry,
Best Regards,
J.
PATCH v2 4/4 add Siemens SX1 Machine support
In reply to Jean-Christophe PLAGNIOL-VILLARDSiemens SX1 Cellphone V1
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 16 MB at 0x00000000
- Application flash 8 MB at 0x04000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
Siemens SX1 Cellphone V2
- ARM OMAP310 processor
- SRAM 192 kB
- SDRAM 32 MB at 0x10000000
- Boot flash 32 MB at 0x00000000
- 3 serial ports
- 1 SecureDigital
- 1 LCD display
- 1 RTC
U-Boot (mainline) and Linux kernel (2.6.26) tested
---
add qemu-doc
and fix QEMUMachine var name (invert between v1 and v2)
Best Regards,
J.
Makefile.target | 2 +- hw/boards.h | 4 + hw/omap_sx1.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++ qemu-doc.texi | 26 ++++++ target-arm/machine.c | 2 + 5 files changed, 269 insertions(+), 1 deletions(-) create mode 100644 hw/omap_sx1.c
Makefile.target +1 -1
@@ -727,7 +727,7 @@ OBJS+= pflash_cfi01.o gumstix.o OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o OBJS+= omap2.o omap_dss.o soc_dma.o -OBJS+= palm.o tsc210x.o +OBJS+= omap_sx1.o palm.o tsc210x.o OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o OBJS+= tsc2005.o bt-hci-csr.o OBJS+= mst_fpga.o mainstone.o
hw/boards.h +4 -0
@@ -86,6 +86,10 @@ extern QEMUMachine spitzpda_machine;extern QEMUMachine borzoipda_machine;extern QEMUMachine terrierpda_machine; +/* omap_sx1.c */ +extern QEMUMachine sx1_machine_v1; +extern QEMUMachine sx1_machine_v2; +/* palm.c */ extern QEMUMachine palmte_machine;
hw/omap_sx1.c new file +236 -0
236 lines not on this page · raw message
qemu-doc.texi +26 -0
@@ -2707,6 +2707,32 @@ Secure Digital card connected to OMAP MMC/SD host Three on-chip UARTs @end itemize +The Siemens SX1 models v1 and v2 (default) emulation with U-Boot and Linux +Mainline support. +The emlulaton includes the following elements: + +@itemize @minus +@item +Texas Instruments OMAP310 System-on-chip (ARM 925T core) +@item +ROM and RAM memories (ROM firmware image can be loaded with -pflash) +V1 +1 Flash of 16MB and 1 Flash of 8MB +V2 +1 Flash of 32MB +@item +On-chip LCD controller +@item +On-chip Real Time Clock +@item +TI TSC2102i touchscreen controller / analog-digital converter / Audio +CODEC, connected through MicroWire and I@math{^2}S busses +@item +Secure Digital card connected to OMAP MMC/SD host +@item +Three on-chip UARTs +@end itemize + Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48) emulation supports the following elements:
target-arm/machine.c +2 -0
@@ -11,6 +11,8 @@ void register_machines(void)qemu_register_machine (&spitzpda_machine);qemu_register_machine (&borzoipda_machine);qemu_register_machine (&terrierpda_machine); +qemu_register_machine (&sx1_machine_v1); +qemu_register_machine (&sx1_machine_v2);qemu_register_machine (&palmte_machine);qemu_register_machine (&n800_machine);qemu_register_machine (&n810_machine);
Signature · 1 line
1.5.6.5