📄 mach-smdk2410.c
字号:
/*********************************************************************** * * linux/arch/arm/mach-s3c2410/mach-smdk2410.c * * Copyright (C) 2004 by FS Forth-Systeme GmbH * All rights reserved. * * $Id: mach-smdk2410.c,v 1.1 2004/05/11 14:15:38 mpietrek Exp $ * @Author: Jonas Dietsche * * 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 * * @History: * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by * Ben Dooks <ben@simtec.co.uk> * * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA * 20-Sep-2005 BJD Added static to non-exported items * ***********************************************************************/#include <linux/kernel.h>#include <linux/types.h>#include <linux/interrupt.h>#include <linux/list.h>#include <linux/timer.h>#include <linux/init.h>/**********follow is add by ghy 2007.06.05************/#include <asm/arch/fb.h>#include <linux/device.h>/*********above is added by ghy 2007.06.05************/#include <asm/mach/arch.h>#include <asm/mach/map.h>#include <asm/mach/irq.h>#include <asm/hardware.h>#include <asm/io.h>#include <asm/irq.h>#include <asm/mach-types.h>#include <asm/arch/regs-serial.h>#include "devs.h"#include "cpu.h"static struct map_desc smdk2410_iodesc[] __initdata = { /* nothing here yet */};#define UCON S3C2410_UCON_DEFAULT#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODEstatic struct s3c2410_uartcfg smdk2410_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, .ucon = UCON, .ulcon = ULCON, .ufcon = UFCON, }, [1] = { .hwport = 1, .flags = 0, .ucon = UCON, .ulcon = ULCON, .ufcon = UFCON, }, [2] = { .hwport = 2, .flags = 0, .ucon = UCON, .ulcon = ULCON, .ufcon = UFCON, }};static struct platform_device *smdk2410_devices[] __initdata = { &s3c_device_usb, &s3c_device_lcd, &s3c_device_wdt, &s3c_device_i2c, &s3c_device_iis, &s3c_device_nand, /******added by ghy 2007.04.24****/};static struct s3c24xx_board smdk2410_board __initdata = { .devices = smdk2410_devices, .devices_count = ARRAY_SIZE(smdk2410_devices)};/************** added by ghy 2007.06.05********/static struct s3c2410fb_mach_info smdk2410_lcd_platdata = { .fixed_syncs=0, .width=640, .height=480, .xres={ .defval=640, .min=640, .max=640, }, .yres = { .defval=480, .min=480, .max=480, }, .bpp = { .defval=16, .min=16, .max=16, }, .regs = { .lcdcon1= S3C2410_LCDCON1_TFT16BPP | S3C2410_LCDCON1_TFT | S3C2410_LCDCON1_CLKVAL(1), .lcdcon2 = S3C2410_LCDCON2_VBPD(32) | S3C2410_LCDCON2_VFPD(9) | S3C2410_LCDCON2_VSPW(1)|S3C2410_LCDCON2_LINEVAL(479), .lcdcon3 = S3C2410_LCDCON3_HBPD(47) | S3C2410_LCDCON3_HFPD(15)|S3C2410_LCDCON3_HOZVAL(639), .lcdcon4 = S3C2410_LCDCON4_MVAL(13) | S3C2410_LCDCON4_HSPW(95), .lcdcon5 = S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_HWSWP | S3C2410_LCDCON5_INVVLINE|S3C2410_LCDCON5_INVVFRAME|S3C2410_LCDCON5_PWREN, }, .gpcup=0xFFFFFFFF, .gpcup_mask=0xFFFFFFFF, .gpccon=0xaaaaaaaa, .gpccon_mask=0xFFFFFFFF, .gpdup=0xFFFFFFFF, .gpdup_mask=0xFFFFFFFF, .gpdcon = 0xaaaaaaaa, .gpdcon_mask=0xFFFFFFFF, .lpcsel =0x0, };/***************added by ghy 2007.06.05**************/static void __init smdk2410_map_io(void){ set_s3c2410fb_info(&smdk2410_lcd_platdata);/******added by ghy ****/ s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); s3c24xx_init_clocks(0); s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); s3c24xx_set_board(&smdk2410_board);}static void __init smdk2410_init_irq(void){ s3c24xx_init_irq();}/**add by ghy 2007.06.15static void __init smdk2410_init_fb(void){ set_s3c2410fb_info(&smdk2410_lcd_platdata);}*/MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch * to SMDK2410 */ /* Maintainer: Jonas Dietsche */ .phys_ram = S3C2410_SDRAM_PA, .phys_io = S3C2410_PA_UART, .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, .boot_params = S3C2410_SDRAM_PA + 0x100, .map_io = smdk2410_map_io, .init_irq = smdk2410_init_irq, .timer = &s3c24xx_timer,MACHINE_END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -