mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2025-04-21 12:27:27 +03:00
qi-move-cpu-specific-drivers-into-cpu-dir.patch
Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
@@ -45,6 +45,8 @@ typedef enum {
|
||||
S3C64XX_UART2,
|
||||
} S3C64XX_UARTS_NR;
|
||||
|
||||
#define __REG(x) (*((unsigned int *)(x)))
|
||||
|
||||
//#include <s3c64x0.h>
|
||||
#endif
|
||||
|
||||
@@ -1306,79 +1308,6 @@ typedef enum {
|
||||
|
||||
/* include common stuff */
|
||||
#ifndef __ASSEMBLY__
|
||||
static inline S3C64XX_MEMCTL * S3C64XX_GetBase_MEMCTL(void)
|
||||
{
|
||||
return (S3C64XX_MEMCTL *)(ELFIN_DMC0_BASE);
|
||||
}
|
||||
static inline S3C64XX_USB_HOST * S3C64XX_GetBase_USB_HOST(void)
|
||||
{
|
||||
return (S3C64XX_USB_HOST *)ELFIN_USB_HOST_BASE;
|
||||
}
|
||||
static inline S3C64XX_INTERRUPT * S3C64XX_GetBase_INTERRUPT(void)
|
||||
{
|
||||
return (S3C64XX_INTERRUPT *)ELFIN_VIC0_BASE_ADDR;
|
||||
}
|
||||
static inline S3C64XX_DMAS * S3C64XX_GetBase_DMAS(void)
|
||||
{
|
||||
return (S3C64XX_DMAS *)ELFIN_DMA_BASE;
|
||||
}
|
||||
static inline S3C64XX_CLOCK_POWER * S3C64XX_GetBase_CLOCK_POWER(void)
|
||||
{
|
||||
return (S3C64XX_CLOCK_POWER *)ELFIN_CLOCK_POWER_BASE;
|
||||
}
|
||||
static inline S3C64XX_LCD * S3C64XX_GetBase_LCD(void)
|
||||
{
|
||||
return (S3C64XX_LCD *)ELFIN_LCD_BASE;
|
||||
}
|
||||
/*
|
||||
static inline S3C2410_NAND * S3C2410_GetBase_NAND(void)
|
||||
{
|
||||
return (S3C2410_NAND *)ELFIN_NAND_BASE;
|
||||
}
|
||||
*/
|
||||
static inline S3C64XX_UART * S3C64XX_GetBase_UART(S3C64XX_UARTS_NR nr)
|
||||
{
|
||||
// return (S3C64XX_UART *)(ELFIN_UART_BASE + (nr * 0x4000));
|
||||
return (S3C64XX_UART *)(ELFIN_UART_BASE + (nr*0x400));
|
||||
}
|
||||
static inline S3C64XX_TIMERS * S3C64XX_GetBase_TIMERS(void)
|
||||
{
|
||||
return (S3C64XX_TIMERS *)ELFIN_TIMER_BASE;
|
||||
}
|
||||
/*
|
||||
static inline S3C64XX_USB_DEVICE * S3C64XX_GetBase_USB_DEVICE(void)
|
||||
{
|
||||
return (S3C64XX_USB_DEVICE *)ELFIN_USB_DEVICE_BASE;
|
||||
}
|
||||
*/
|
||||
static inline S3C64XX_WATCHDOG * S3C64XX_GetBase_WATCHDOG(void)
|
||||
{
|
||||
return (S3C64XX_WATCHDOG *)ELFIN_WATCHDOG_BASE;
|
||||
}
|
||||
static inline S3C64XX_I2C * S3C64XX_GetBase_I2C(void)
|
||||
{
|
||||
return (S3C64XX_I2C *)ELFIN_I2C_BASE;
|
||||
}
|
||||
static inline S3C64XX_I2S * S3C64XX_GetBase_I2S(void)
|
||||
{
|
||||
return (S3C64XX_I2S *)ELFIN_I2S_BASE;
|
||||
}
|
||||
static inline S3C64XX_GPIO * S3C64XX_GetBase_GPIO(void)
|
||||
{
|
||||
return (S3C64XX_GPIO *)ELFIN_GPIO_BASE;
|
||||
}
|
||||
static inline S3C64XX_RTC * S3C64XX_GetBase_RTC(void)
|
||||
{
|
||||
return (S3C64XX_RTC *)ELFIN_RTC_BASE;
|
||||
}
|
||||
static inline S3C2410_ADC * S3C2410_GetBase_ADC(void)
|
||||
{
|
||||
return (S3C2410_ADC *)ELFIN_ADC_BASE;
|
||||
}
|
||||
static inline S3C64XX_SPI * S3C64XX_GetBase_SPI(void)
|
||||
{
|
||||
return (S3C64XX_SPI *)ELFIN_SPI_BASE;
|
||||
}
|
||||
#if 0
|
||||
static inline S3C2410_SDI * S3C2410_GetBase_SDI(void)
|
||||
{
|
||||
|
||||
72
qiboot/include/serial-s3c64xx.h
Normal file
72
qiboot/include/serial-s3c64xx.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* (C) Copyright 2007 OpenMoko, Inc.
|
||||
* Author: xiangfu liu <xiangfu@openmoko.org>
|
||||
*
|
||||
* Configuation settings for the FIC Neo GTA02 Linux GSM phone
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SERIAL_S3C64XX_H__
|
||||
#define __SERIAL_S3C64XX_H__
|
||||
|
||||
#define UART0 0
|
||||
#define UART1 1
|
||||
#define UART2 2
|
||||
|
||||
#define rGPHCON (*(volatile unsigned *)0x56000070) /*UART 0 Line control*/
|
||||
|
||||
#define rULCON0 (*(volatile unsigned *)0x50000000) /*UART 0 Line control*/
|
||||
#define rUCON0 (*(volatile unsigned *)0x50000004) /*UART 0 Control*/
|
||||
#define rUFCON0 (*(volatile unsigned *)0x50000008) /*UART 0 FIFO control*/
|
||||
#define rUMCON0 (*(volatile unsigned *)0x5000000c) /*UART 0 Modem control*/
|
||||
#define rUTRSTAT0 (*(volatile unsigned *)0x50000010) /*UART 0 Tx/Rx status*/
|
||||
#define rUERSTAT0 (*(volatile unsigned *)0x50000014) /*UART 0 Rx error status*/
|
||||
#define rUFSTAT0 (*(volatile unsigned *)0x50000018) /*UART 0 FIFO status*/
|
||||
#define rUMSTAT0 (*(volatile unsigned *)0x5000001c) /*UART 0 Modem status*/
|
||||
#define rUBRDIV0 (*(volatile unsigned *)0x50000028) /*UART 0 Baud rate divisor*/
|
||||
|
||||
#define rULCON1 (*(volatile unsigned *)0x50004000) /*UART 1 Line control*/
|
||||
#define rUCON1 (*(volatile unsigned *)0x50004004) /*UART 1 Control*/
|
||||
#define rUFCON1 (*(volatile unsigned *)0x50004008) /*UART 1 FIFO control*/
|
||||
#define rUMCON1 (*(volatile unsigned *)0x5000400c) /*UART 1 Modem control*/
|
||||
#define rUTRSTAT1 (*(volatile unsigned *)0x50004010) /*UART 1 Tx/Rx status*/
|
||||
#define rUERSTAT1 (*(volatile unsigned *)0x50004014) /*UART 1 Rx error status*/
|
||||
#define rUFSTAT1 (*(volatile unsigned *)0x50004018) /*UART 1 FIFO status*/
|
||||
#define rUMSTAT1 (*(volatile unsigned *)0x5000401c) /*UART 1 Modem status*/
|
||||
#define rUBRDIV1 (*(volatile unsigned *)0x50004028) /*UART 1 Baud rate divisor*/
|
||||
|
||||
#define rULCON2 (*(volatile unsigned *)0x50008000) /*UART 2 Line control*/
|
||||
#define rUCON2 (*(volatile unsigned *)0x50008004) /*UART 2 Control*/
|
||||
#define rUFCON2 (*(volatile unsigned *)0x50008008) /*UART 2 FIFO control*/
|
||||
#define rUTRSTAT2 (*(volatile unsigned *)0x50008010) /*UART 2 Tx/Rx status*/
|
||||
#define rUERSTAT2 (*(volatile unsigned *)0x50008014) /*UART 2 Rx error status*/
|
||||
#define rUFSTAT2 (*(volatile unsigned *)0x50008018) /*UART 2 FIFO status*/
|
||||
#define rUBRDIV2 (*(volatile unsigned *)0x50008028) /*UART 2 Baud rate divisor*/
|
||||
|
||||
#define WrUTXH0(ch) (*(volatile unsigned char *)0x50000020)=(unsigned char)(ch)
|
||||
#define RdURXH0() (*(volatile unsigned char *)0x50000024)
|
||||
#define WrUTXH1(ch) (*(volatile unsigned char *)0x50004020)=(unsigned char)(ch)
|
||||
#define RdURXH1() (*(volatile unsigned char *)0x50004024)
|
||||
#define WrUTXH2(ch) (*(volatile unsigned char *)0x50008020)=(unsigned char)(ch)
|
||||
#define RdURXH2() (*(volatile unsigned char *)0x50008024)
|
||||
|
||||
extern void serial_init_115200_s3c64xx(const int uart, const int pclk_MHz);
|
||||
extern void serial_putc_s3c64xx(const int uart, const char c);
|
||||
extern int puts(const char *string);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user