Path: blob/master/arch/arm/mach-mxs/devices/amba-duart.c
10819 views
/*1* Copyright (C) 2009-2010 Pengutronix2* Uwe Kleine-Koenig <[email protected]>3*4* Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.5*6* This program is free software; you can redistribute it and/or modify it under7* the terms of the GNU General Public License version 2 as published by the8* Free Software Foundation.9*/10#include <asm/irq.h>11#include <mach/mx23.h>12#include <mach/mx28.h>13#include <mach/devices-common.h>1415#define MXS_AMBA_DUART_DEVICE(name, soc) \16const struct amba_device name##_device __initconst = { \17.dev = { \18.init_name = "duart", \19}, \20.res = { \21.start = soc ## _DUART_BASE_ADDR, \22.end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \23.flags = IORESOURCE_MEM, \24}, \25.irq = {soc ## _INT_DUART, NO_IRQ}, \26}2728#ifdef CONFIG_SOC_IMX2329MXS_AMBA_DUART_DEVICE(mx23_duart, MX23);30#endif3132#ifdef CONFIG_SOC_IMX2833MXS_AMBA_DUART_DEVICE(mx28_duart, MX28);34#endif3536int __init mxs_add_duart(const struct amba_device *dev)37{38return mxs_add_amba_device(dev);39}404142