summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/s5l8700/ata-nand-s5l8700.c94
-rw-r--r--firmware/target/arm/s5l8700/boot.lds54
-rw-r--r--firmware/target/arm/s5l8700/crt0.S117
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sl/adc-target.h33
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sl/backlight-target.h27
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sl/button-target.h52
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c133
-rw-r--r--firmware/target/arm/s5l8700/system-s5l8700.c168
-rw-r--r--firmware/target/arm/s5l8700/system-target.h35
9 files changed, 713 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8700/ata-nand-s5l8700.c b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
new file mode 100644
index 0000000000..dd0ae7a950
--- /dev/null
+++ b/firmware/target/arm/s5l8700/ata-nand-s5l8700.c
@@ -0,0 +1,94 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Dave Chapman
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "ata.h"
20#include "ata-target.h"
21#include "ata_idle_notify.h"
22#include "system.h"
23#include <string.h>
24#include "thread.h"
25#include "led.h"
26#include "disk.h"
27#include "panic.h"
28#include "usb.h"
29
30/* for compatibility */
31int ata_spinup_time = 0;
32
33long last_disk_activity = -1;
34
35/** static, private data **/
36static bool initialized = false;
37
38static long next_yield = 0;
39#define MIN_YIELD_PERIOD 2000
40
41/* API Functions */
42
43void ata_led(bool onoff)
44{
45 led(onoff);
46}
47
48int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
49 void* inbuf)
50{
51
52}
53
54int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
55 const void* outbuf)
56{
57}
58
59void ata_spindown(int seconds)
60{
61 (void)seconds;
62}
63
64bool ata_disk_is_active(void)
65{
66 return 0;
67}
68
69void ata_sleep(void)
70{
71}
72
73void ata_spin(void)
74{
75}
76
77/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */
78int ata_hard_reset(void)
79{
80 return 0;
81}
82
83int ata_soft_reset(void)
84{
85 return 0;
86}
87
88void ata_enable(bool on)
89{
90}
91
92int ata_init(void)
93{
94}
diff --git a/firmware/target/arm/s5l8700/boot.lds b/firmware/target/arm/s5l8700/boot.lds
new file mode 100644
index 0000000000..757abaa11a
--- /dev/null
+++ b/firmware/target/arm/s5l8700/boot.lds
@@ -0,0 +1,54 @@
1#include "config.h"
2
3ENTRY(start)
4OUTPUT_FORMAT(elf32-littlearm)
5OUTPUT_ARCH(arm)
6STARTUP(target/arm/s5l8700/crt0.o)
7
8/* DRAMORIG is in fact 0x8000000 but remapped to 0x0 */
9#define DRAMORIG 0x0
10#define DRAMSIZE 16M
11#
12#define IRAMORIG 0x22000000
13#define IRAMSIZE 256K
14
15/* This is not available in all versions of the S5L8700 */
16#define FLASHORIG 0x24000000
17#define FLASHSIZE 1M
18
19SECTIONS
20{
21 . = IRAMORIG;
22
23 .text : {
24 *(.init.text)
25 *(.text*)
26 }
27
28 .data : {
29 *(.icode)
30 *(.irodata)
31 *(.idata)
32 *(.data*)
33 *(.ncdata*);
34 _dataend = . ;
35 }
36
37 .stack :
38 {
39 *(.stack)
40 _stackbegin = .;
41 stackbegin = .;
42 . += 0x2000;
43 _stackend = .;
44 stackend = .;
45 }
46
47 .bss : {
48 _edata = .;
49 *(.bss*);
50 *(.ibss);
51 *(.ncbss*);
52 _end = .;
53 }
54}
diff --git a/firmware/target/arm/s5l8700/crt0.S b/firmware/target/arm/s5l8700/crt0.S
new file mode 100644
index 0000000000..3ecabdeaef
--- /dev/null
+++ b/firmware/target/arm/s5l8700/crt0.S
@@ -0,0 +1,117 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Marcoen Hirschberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20#include "cpu.h"
21
22 .section .init.text,"ax",%progbits
23
24 .global start
25start:
26 /* Exception vectors */
27 b newstart
28 b undef_instr_handler
29 b software_int_handler
30 b prefetch_abort_handler
31 b data_abort_handler
32 b reserved_handler
33 b irq_handler
34 b fiq_handler
35 .word 0x43554644 /* DFUC */
36
37newstart:
38#if 0
39 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
40
41 /* Initialise bss section to zero */
42 ldr r2, =_edata
43 ldr r3, =_end
44 mov r4, #0
451:
46 cmp r3, r2
47 strhi r4, [r2], #4
48 bhi 1b
49
50 /* Set up some stack and munge it with 0xdeadbeef */
51 ldr sp, =stackend
52 ldr r2, =stackbegin
53 ldr r3, =0xdeadbeef
541:
55 cmp sp, r2
56 strhi r3, [r2], #4
57 bhi 1b
58
59 /* Set up stack for IRQ mode */
60 msr cpsr_c, #0xd2
61 ldr sp, =irq_stack
62
63 /* Set up stack for FIQ mode */
64 msr cpsr_c, #0xd1
65 ldr sp, =fiq_stack
66
67 /* Let abort and undefined modes use IRQ stack */
68 msr cpsr_c, #0xd7
69 ldr sp, =irq_stack
70 msr cpsr_c, #0xdb
71 ldr sp, =irq_stack
72
73 /* Switch back to supervisor mode */
74 msr cpsr_c, #0xd3
75#endif
76 bl main
77
78
79 .text
80/* .global UIE*/
81
82/* All illegal exceptions call into UIE with exception address as first
83 * parameter. This is calculated differently depending on which exception
84 * we're in. Second parameter is exception number, used for a string lookup
85 * in UIE. */
86undef_instr_handler:
87 mov r0, lr
88 mov r1, #0
89 b UIE
90
91/* We run supervisor mode most of the time, and should never see a software
92 * exception being thrown. Perhaps make it illegal and call UIE? */
93software_int_handler:
94reserved_handler:
95 movs pc, lr
96
97prefetch_abort_handler:
98 sub r0, lr, #4
99 mov r1, #1
100 b UIE
101
102data_abort_handler:
103 sub r0, lr, #8
104 mov r1, #2
105 b UIE
106
107/* 256 words of IRQ stack */
108 .space 256*4
109irq_stack:
110
111/* 256 words of FIQ stack */
112 .space 256*4
113fiq_stack:
114
115end:
116 /*.word 0xA5A5A5A5
117 .word 0x5A5A5A5A*/
diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/adc-target.h b/firmware/target/arm/s5l8700/meizu-m6sl/adc-target.h
new file mode 100644
index 0000000000..c0a069ac0c
--- /dev/null
+++ b/firmware/target/arm/s5l8700/meizu-m6sl/adc-target.h
@@ -0,0 +1,33 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Barry Wardell
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef _ADC_TARGET_H_
20#define _ADC_TARGET_H_
21
22/* only two channels used by the Gigabeat */
23#define NUM_ADC_CHANNELS 1
24
25#define ADC_UNKNOWN_1 0
26#define ADC_UNKNOWN_2 1
27#define ADC_BATTERY 2
28#define ADC_UNKNOWN_4 3
29
30#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
31#define ADC_READ_ERROR 0xFFFF
32
33#endif
diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/backlight-target.h b/firmware/target/arm/s5l8700/meizu-m6sl/backlight-target.h
new file mode 100644
index 0000000000..1dc334cffa
--- /dev/null
+++ b/firmware/target/arm/s5l8700/meizu-m6sl/backlight-target.h
@@ -0,0 +1,27 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Marcoen Hirschberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef BACKLIGHT_TARGET_H
20#define BACKLIGHT_TARGET_H
21
22bool _backlight_init(void);
23void _backlight_on(void);
24void _backlight_off(void);
25void _backlight_set_brightness(int brightness);
26
27#endif
diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h b/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h
new file mode 100644
index 0000000000..7d0d7a1c4d
--- /dev/null
+++ b/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h
@@ -0,0 +1,52 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef _BUTTON_TARGET_H_
20#define _BUTTON_TARGET_H_
21
22#include <stdbool.h>
23#include "config.h"
24
25#define HAS_BUTTON_HOLD
26
27bool button_hold(void);
28void button_init_device(void);
29int button_read_device(void);
30
31/* Toshiba Gigabeat specific button codes */
32
33#define BUTTON_LEFT 0x00000001
34#define BUTTON_RIGHT 0x00000002
35#define BUTTON_UP 0x00000004
36#define BUTTON_DOWN 0x00000008
37
38#define BUTTON_SELECT 0x00000010
39
40#define BUTTON_MENU 0x00000020
41#define BUTTON_PLAY 0x00000040
42
43
44#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
45 |BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY)
46
47#define BUTTON_REMOTE 0
48
49#define POWEROFF_BUTTON BUTTON_PLAY
50#define POWEROFF_COUNT 10
51
52#endif /* _BUTTON_TARGET_H_ */
diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c b/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
new file mode 100644
index 0000000000..8e5a4f472a
--- /dev/null
+++ b/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
@@ -0,0 +1,133 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Alan Korr
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20
21#include "hwcompat.h"
22#include "kernel.h"
23#include "lcd.h"
24#include "system.h"
25#include "cpu.h"
26
27/*** definitions ***/
28
29
30/** globals **/
31
32static int xoffset; /* needed for flip */
33
34/*** hardware configuration ***/
35
36int lcd_default_contrast(void)
37{
38 return 0x1f;
39}
40
41void lcd_set_contrast(int val)
42{
43}
44
45void lcd_set_invert_display(bool yesno)
46{
47}
48
49/* turn the display upside down (call lcd_update() afterwards) */
50void lcd_set_flip(bool yesno)
51{
52 /* TODO: flip mode isn't working. The commands in the else part of
53 this function are how the original firmware inits the LCD */
54
55 if (yesno)
56 {
57 xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */
58 }
59 else
60 {
61 xoffset = 0;
62 }
63}
64
65
66/* LCD init */
67void lcd_init_device(void)
68{
69}
70
71/*** Update functions ***/
72
73/* Performance function that works with an external buffer
74 note that by and bheight are in 8-pixel units! */
75void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
76 int bheight, int stride)
77{
78 /* Copy display bitmap to hardware */
79 while (bheight--)
80 {
81 }
82}
83
84
85/* Performance function that works with an external buffer
86 note that by and bheight are in 8-pixel units! */
87void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
88 int x, int by, int width, int bheight, int stride)
89{
90 (void)values;
91 (void)phases;
92 (void)x;
93 (void)by;
94 (void)width;
95 (void)bheight;
96 (void)stride;
97}
98
99/* Update the display.
100 This must be called after all other LCD functions that change the display. */
101void lcd_update(void) ICODE_ATTR;
102void lcd_update(void)
103{
104 int y;
105
106 /* Copy display bitmap to hardware */
107 for (y = 0; y < LCD_FBHEIGHT; y++)
108 {
109 }
110}
111
112/* Update a fraction of the display. */
113void lcd_update_rect(int, int, int, int) ICODE_ATTR;
114void lcd_update_rect(int x, int y, int width, int height)
115{
116 int ymax;
117
118 /* The Y coordinates have to work on even 8 pixel rows */
119 ymax = (y + height-1) >> 3;
120 y >>= 3;
121
122 if(x + width > LCD_WIDTH)
123 width = LCD_WIDTH - x;
124 if (width <= 0)
125 return; /* nothing left to do, 0 is harmful to lcd_write_data() */
126 if(ymax >= LCD_FBHEIGHT)
127 ymax = LCD_FBHEIGHT-1;
128
129 /* Copy specified rectange bitmap to hardware */
130 for (; y <= ymax; y++)
131 {
132 }
133}
diff --git a/firmware/target/arm/s5l8700/system-s5l8700.c b/firmware/target/arm/s5l8700/system-s5l8700.c
new file mode 100644
index 0000000000..2d87cc8c9a
--- /dev/null
+++ b/firmware/target/arm/s5l8700/system-s5l8700.c
@@ -0,0 +1,168 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Rob Purchase
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "kernel.h"
21#include "system.h"
22#include "panic.h"
23
24#define default_interrupt(name) \
25 extern __attribute__((weak,alias("UIRQ"))) void name (void)
26
27void irq_handler(void) __attribute__((interrupt ("IRQ"), naked));
28void fiq_handler(void) __attribute__((interrupt ("FIQ"), naked));
29
30default_interrupt(EXT0);
31default_interrupt(EXT1);
32default_interrupt(EXT2);
33default_interrupt(EINT_VBUS);
34default_interrupt(EINTG);
35default_interrupt(INT_TIMERA);
36default_interrupt(INT_WDT);
37default_interrupt(INT_TIMERB);
38default_interrupt(INT_TIMERC);
39default_interrupt(INT_TIMERD);
40default_interrupt(INT_DMA);
41default_interrupt(INT_ALARM_RTC);
42default_interrupt(INT_PRI_RTC);
43default_interrupt(RESERVED1);
44default_interrupt(INT_UART);
45default_interrupt(INT_USB_HOST);
46default_interrupt(INT_USB_FUNC);
47default_interrupt(INT_LCDC_0);
48default_interrupt(INT_LCDC_1);
49default_interrupt(INT_ECC);
50default_interrupt(INT_CALM);
51default_interrupt(INT_ATA);
52default_interrupt(INT_UART0);
53default_interrupt(INT_SPDIF_OUT);
54default_interrupt(INT_SDCI);
55default_interrupt(INT_LCD);
56default_interrupt(INT_SPI);
57default_interrupt(INT_IIC);
58default_interrupt(RESERVED2);
59default_interrupt(INT_MSTICK);
60default_interrupt(INT_ADC_WAKEUP);
61default_interrupt(INT_ADC);
62
63
64
65static void (* const irqvector[])(void) =
66{
67 EXT0,EXT1,EXT2,EINT_VBUS,EINTG,INT_TIMERA,INT_WDT,INT_TIMERB,
68 INT_TIMERC,INT_TIMERD,INT_DMA,INT_ALARM_RTC,INT_PRI_RTC,RESERVED1,INT_UART,INT_USB_HOST,
69 INT_USB_FUNC,INT_LCDC_0,INT_LCDC_1,INT_ECC,INT_CALM,INT_ATA,INT_UART0,INT_SPDIF_OUT,
70 INT_SDCI,INT_LCD,INT_SPI,INT_IIC,RESERVED2,INT_MSTICK,INT_ADC_WAKEUP,INT_ADC
71};
72
73static const char * const irqname[] =
74{
75 "EXT0","EXT1","EXT2","EINT_VBUS","EINTG","INT_TIMERA","INT_WDT","INT_TIMERB",
76 "INT_TIMERC","INT_TIMERD","INT_DMA","INT_ALARM_RTC","INT_PRI_RTC","Reserved","INT_UART","INT_USB_HOST",
77 "INT_USB_FUNC","INT_LCDC_0","INT_LCDC_1","INT_ECC","INT_CALM","INT_ATA","INT_UART0","INT_SPDIF_OUT",
78 "INT_SDCI","INT_LCD","INT_SPI","INT_IIC","Reserved","INT_MSTICK","INT_ADC_WAKEUP","INT_ADC"
79};
80
81static void UIRQ(void)
82{
83 unsigned int offset = INTOFFSET;
84 panicf("Unhandled IRQ %02X: %s", offset, irqname[offset]);
85}
86
87void irq_handler(void)
88{
89 /*
90 * Based on: linux/arch/arm/kernel/entry-armv.S and system-meg-fx.c
91 */
92
93 asm volatile( "stmfd sp!, {r0-r7, ip, lr} \n" /* Store context */
94 "sub sp, sp, #8 \n"); /* Reserve stack */
95
96 int irq_no = INTOFFSET; /* Read clears the corresponding IRQ status */
97
98 if ((irq_no & (1<<31)) == 0) /* Ensure invalid flag is not set */
99 {
100 irqvector[irq_no]();
101 }
102
103 asm volatile( "add sp, sp, #8 \n" /* Cleanup stack */
104 "ldmfd sp!, {r0-r7, ip, lr} \n" /* Restore context */
105 "subs pc, lr, #4 \n"); /* Return from IRQ */
106}
107
108void fiq_handler(void)
109{
110 asm volatile (
111 "subs pc, lr, #4 \r\n"
112 );
113}
114
115
116static void gpio_init(void)
117{
118}
119
120static void clock_init(void)
121{
122}
123
124
125void system_init(void)
126{
127}
128
129void system_reboot(void)
130{
131}
132
133int system_memory_guard(int newmode)
134{
135 (void)newmode;
136 return 0;
137}
138
139#ifdef HAVE_ADJUSTABLE_CPU_FREQ
140
141void set_cpu_frequency(long frequency)
142{
143 if (cpu_frequency == frequency)
144 return;
145
146 /* CPU/COP frequencies can be scaled between Fbus (min) and Fsys (max).
147 Fbus should not be set below ~32Mhz with LCD enabled or the display
148 will be garbled. */
149 if (frequency == CPUFREQ_MAX)
150 {
151 }
152 else if (frequency == CPUFREQ_NORMAL)
153 {
154 }
155 else
156 {
157 }
158
159 asm volatile (
160 "nop \n\t"
161 "nop \n\t"
162 "nop \n\t"
163 );
164
165 cpu_frequency = frequency;
166}
167
168#endif
diff --git a/firmware/target/arm/s5l8700/system-target.h b/firmware/target/arm/s5l8700/system-target.h
new file mode 100644
index 0000000000..158bc44190
--- /dev/null
+++ b/firmware/target/arm/s5l8700/system-target.h
@@ -0,0 +1,35 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Dave Chapman
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef SYSTEM_TARGET_H
20#define SYSTEM_TARGET_H
21
22#include "system-arm.h"
23
24#define CPUFREQ_DEFAULT 32000000
25#define CPUFREQ_NORMAL 48000000
26#define CPUFREQ_MAX 192000000
27
28#define inl(a) (*(volatile unsigned long *) (a))
29#define outl(a,b) (*(volatile unsigned long *) (b) = (a))
30#define inb(a) (*(volatile unsigned char *) (a))
31#define outb(a,b) (*(volatile unsigned char *) (b) = (a))
32#define inw(a) (*(volatile unsigned short *) (a))
33#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
34
35#endif /* SYSTEM_TARGET_H */