?? smdk.c
字號:
/* * linux/arch/arm/mach-s3c2410/smdk.c * * Copyright (C) 2002 MIZI Research, Inc. * * 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 * * 2002-05-20: Janghoon Lyu <nandy@mizi.com> * - Initial code * * This file contains all SMDK2410-specific tewaks. */#include <linux/config.h>#include <linux/init.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/tty.h>#include <linux/module.h>#include <linux/errno.h>#include <linux/serial_core.h>#include <asm/hardware.h>#include <asm/setup.h>#include <asm/page.h>#include <asm/pgtable.h>#include <asm/mach/arch.h>#include <asm/mach/map.h>#include "generic.h"#ifdef CONFIG_PMstruct mz_pm_ops_t mz_pm_ops = { machine_pm: NULL, get_power_status: NULL, fb_ioctl: NULL, blank_helper: NULL,};EXPORT_SYMBOL(mz_pm_ops);#endifstatic int __init smdk_init(void){#if !defined(CONFIG_SMDK_THREEWATER1) set_gpio_ctrl(GPIO_LED1); set_gpio_ctrl(GPIO_LED2); set_gpio_ctrl(GPIO_LED3); set_gpio_ctrl(GPIO_LED4);#endif return 0;}__initcall(smdk_init);static void __initfixup_smdk(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi){ /* TODO */#if 0 /* hacked by nandy. Is these codes need ? */ struct tag *t = (struct tag *)params; if (t->hdr.tag != ATAG_CORE) convert_to_tag_list(params, 1); if (t->hdr.tag != ATAG_CORE) { t->hdr.tag = ATAG_CORE; t = tag_next(t); t->hdr.tag = ATAG_MEM; t->u.mem.start = 0x0c000000; t->u.mem.size = 32 * 1024 * 1024; }#endif}#ifdef CONFIG_SMDK_THREEWATER1/* * I/O mapping: * * pCX06883_BASE nGCS1, CX06883 * pIDE_BASE nGCS1, IDE * pAX88796_BASE nGCS2, AX88796 *//*AX88796, nGCS2*/static struct map_desc smdk_io_desc[] __initdata = { /* virtual physical length domain r w c b */// { vCS8900_BASE, pCS8900_BASE, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },#if defined(CONFIG_NE2000) || defined(CONFIG_NE2000_MODULE) { vAX88796_BASE, pAX88796_BASE, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },#endif#if defined(CONFIG_SERIAL_CX06883) || defined(CONFIG_SERIAL_CX06883_MODULE) { vCX06883_BASE, pCX06883_BASE, CX06883_LEN, DOMAIN_IO, 0, 1, 0, 0 },#endif#if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) { vIDE_BASE, pIDE_BASE, IDE_LEN, DOMAIN_IO, 0, 1, 0, 0 },#endif#if defined(CONFIG_S3C2410_PCMCIA_CPLD) || defined(CONFIG_S3C2410_PCMCIA_CPLD_MODULE) { vPCMCIA_BASE, pPCMCIA_BASE, PCMCIA_LEN, DOMAIN_IO, 0, 1, 0, 0 },#endif LAST_DESC};#else/* * I/O mapping: * * pNOR_CS8900_BASE nGCS3, CS8900a * pCF_MEM_BASE nGCS2, PCMCIA Memory * pCF_IO_BASE nGCS2, PCMCIA I/O */static struct map_desc smdk_io_desc[] __initdata = { /* virtual physical length domain r w c b */ { vCS8900_BASE, pCS8900_BASE, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, { vCF_MEM_BASE, pCF_MEM_BASE, 0x01000000, DOMAIN_IO, 0, 1, 0, 0 }, { vCF_IO_BASE, pCF_IO_BASE, 0x01000000, DOMAIN_IO, 0, 1, 0, 0 }, LAST_DESC};#endif#ifdef CONFIG_PMextern void register_wakeup_src(u_int, int, int);#endifstatic void __init smdk_map_io(void){ s3c2410_map_io(); iotable_init(smdk_io_desc); s3c2410_register_uart(0, 0); s3c2410_register_uart(1, 1); set_gpio_ctrl(GPIO_IR_TXD); set_gpio_ctrl(GPIO_IR_RXD); s3c2410_register_uart(2, 2);#ifdef CONFIG_PM register_wakeup_src(0, EXT_FALLING_EDGE, 0);#endif}MACHINE_START(SMDK2410, "Samsung-SMDK2410") BOOT_MEM(0x30000000, 0x48000000, 0xe8000000) BOOT_PARAMS(0x30000100) FIXUP(fixup_smdk) MAPIO(smdk_map_io) INITIRQ(s3c2410_init_irq)MACHINE_END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -