Path: blob/master/arch/mips/loongson/common/uart_base.c
10818 views
/*1* Copyright (C) 2009 Lemote Inc.2* Author: Wu Zhangjin, [email protected]3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License as published by the6* Free Software Foundation; either version 2 of the License, or (at your7* option) any later version.8*/910#include <linux/module.h>11#include <asm/bootinfo.h>1213#include <loongson.h>1415/* ioremapped */16unsigned long _loongson_uart_base;17EXPORT_SYMBOL(_loongson_uart_base);18/* raw */19unsigned long loongson_uart_base;20EXPORT_SYMBOL(loongson_uart_base);2122void prom_init_loongson_uart_base(void)23{24switch (mips_machtype) {25case MACH_LEMOTE_FL2E:26loongson_uart_base = LOONGSON_PCIIO_BASE + 0x3f8;27break;28case MACH_LEMOTE_FL2F:29case MACH_LEMOTE_LL2F:30loongson_uart_base = LOONGSON_PCIIO_BASE + 0x2f8;31break;32case MACH_LEMOTE_ML2F7:33case MACH_LEMOTE_YL2F89:34case MACH_DEXXON_GDIUM2F10:35case MACH_LEMOTE_NAS:36default:37/* The CPU provided serial port */38loongson_uart_base = LOONGSON_LIO1_BASE + 0x3f8;39break;40}4142_loongson_uart_base =43(unsigned long)ioremap_nocache(loongson_uart_base, 8);44}454647