2019-05-27 08:55:01 +02:00
// SPDX-License-Identifier: GPL-2.0-or-later
2009-06-03 18:36:54 -07:00
/*
* DA8XX / OMAP L1XX platform device data
*
* Copyright ( c ) 2007 - 2009 , MontaVista Software , Inc . < source @ mvista . com >
* Derived from code that was :
* Copyright ( C ) 2006 Komal Shah < komal_shah802003 @ yahoo . com >
*/
2011-07-06 06:01:23 +00:00
# include <linux/ahci_platform.h>
2018-05-18 11:48:14 -05:00
# include <linux/clk-provider.h>
2011-07-06 06:01:23 +00:00
# include <linux/clk.h>
2018-05-18 11:48:14 -05:00
# include <linux/clkdev.h>
2020-09-11 10:56:52 +02:00
# include <linux/dma-map-ops.h>
2016-02-02 14:43:13 +02:00
# include <linux/dmaengine.h>
2018-05-18 11:48:14 -05:00
# include <linux/init.h>
2019-04-18 15:20:22 -07:00
# include <linux/io.h>
2018-05-18 11:48:14 -05:00
# include <linux/platform_device.h>
# include <linux/reboot.h>
# include <linux/serial_8250.h>
2009-06-03 18:36:54 -07:00
2022-04-28 09:32:09 +02:00
# include "common.h"
# include "cputype.h"
# include "da8xx.h"
2015-01-30 10:45:33 +01:00
# include "cpuidle.h"
2019-02-14 15:52:03 +01:00
# include "irqs.h"
2015-01-30 10:45:33 +01:00
# include "sram.h"
2009-06-03 18:36:54 -07:00
# define DA8XX_TPCC_BASE 0x01c00000
# define DA8XX_TPTC0_BASE 0x01c08000
# define DA8XX_TPTC1_BASE 0x01c08400
# define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */
# define DA8XX_I2C0_BASE 0x01c22000
2011-04-06 17:29:24 +00:00
# define DA8XX_RTC_BASE 0x01c23000
2012-10-08 09:53:08 -04:00
# define DA8XX_PRUSS_MEM_BASE 0x01c30000
2011-04-06 17:29:24 +00:00
# define DA8XX_MMCSD0_BASE 0x01c40000
# define DA8XX_SPI0_BASE 0x01c41000
# define DA830_SPI1_BASE 0x01e12000
# define DA8XX_LCD_CNTRL_BASE 0x01e13000
2011-07-06 06:01:23 +00:00
# define DA850_SATA_BASE 0x01e18000
2011-04-06 17:29:24 +00:00
# define DA850_MMCSD1_BASE 0x01e1b000
2009-06-03 18:36:54 -07:00
# define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000
# define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000
# define DA8XX_EMAC_CPGMAC_BASE 0x01e23000
# define DA8XX_EMAC_MDIO_BASE 0x01e24000
# define DA8XX_I2C1_BASE 0x01e28000
2011-04-06 17:29:24 +00:00
# define DA850_TPCC1_BASE 0x01e30000
# define DA850_TPTC2_BASE 0x01e38000
2011-04-06 17:17:21 +00:00
# define DA850_SPI1_BASE 0x01f0e000
2011-04-06 17:29:24 +00:00
# define DA8XX_DDR2_CTL_BASE 0xb0000000
2009-06-03 18:36:54 -07:00
# define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000
# define DA8XX_EMAC_MOD_REG_OFFSET 0x2000
# define DA8XX_EMAC_RAM_OFFSET 0x0000
# define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K
2009-11-16 17:21:32 +05:30
void __iomem * da8xx_syscfg0_base ;
void __iomem * da8xx_syscfg1_base ;
2009-08-31 15:47:59 +05:30
2009-11-16 17:21:37 +05:30
static void __iomem * da8xx_ddr2_ctlr_base ;
void __iomem * __init da8xx_get_mem_ctlr ( void )
{
if ( da8xx_ddr2_ctlr_base )
return da8xx_ddr2_ctlr_base ;
da8xx_ddr2_ctlr_base = ioremap ( DA8XX_DDR2_CTL_BASE , SZ_32K ) ;
if ( ! da8xx_ddr2_ctlr_base )
2013-01-10 16:23:20 -08:00
pr_warn ( " %s: Unable to map DDR2 controller " , __func__ ) ;
2009-11-16 17:21:37 +05:30
return da8xx_ddr2_ctlr_base ;
}