Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
spear1340.c File Reference
#include <linux/ahci_platform.h>
#include <linux/amba/serial.h>
#include <linux/delay.h>
#include <linux/dw_dmac.h>
#include <linux/of_platform.h>
#include <asm/hardware/gic.h>
#include <asm/mach/arch.h>
#include <mach/dma.h>
#include <mach/generic.h>
#include <mach/spear.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   "SPEAr1340: " fmt
 
#define SPEAR1340_SATA_BASE   UL(0xB1000000)
 
#define SPEAR1340_UART1_BASE   UL(0xB4100000)
 
#define SPEAR1340_PCM_CFG   (VA_MISC_BASE + 0x100)
 
#define SPEAR1340_PCM_WKUP_CFG   (VA_MISC_BASE + 0x104)
 
#define SPEAR1340_SWITCH_CTR   (VA_MISC_BASE + 0x108)
 
#define SPEAR1340_PERIP1_SW_RST   (VA_MISC_BASE + 0x318)
 
#define SPEAR1340_PERIP2_SW_RST   (VA_MISC_BASE + 0x31C)
 
#define SPEAR1340_PERIP3_SW_RST   (VA_MISC_BASE + 0x320)
 
#define SPEAR1340_PCIE_SATA_CFG   (VA_MISC_BASE + 0x424)
 
#define SPEAR1340_PCIE_CFG_DEVICE_PRESENT   (1 << 11)
 
#define SPEAR1340_PCIE_CFG_POWERUP_RESET   (1 << 10)
 
#define SPEAR1340_PCIE_CFG_CORE_CLK_EN   (1 << 9)
 
#define SPEAR1340_PCIE_CFG_AUX_CLK_EN   (1 << 8)
 
#define SPEAR1340_SATA_CFG_TX_CLK_EN   (1 << 4)
 
#define SPEAR1340_SATA_CFG_RX_CLK_EN   (1 << 3)
 
#define SPEAR1340_SATA_CFG_POWERUP_RESET   (1 << 2)
 
#define SPEAR1340_SATA_CFG_PM_CLK_EN   (1 << 1)
 
#define SPEAR1340_PCIE_SATA_SEL_PCIE   (0)
 
#define SPEAR1340_PCIE_SATA_SEL_SATA   (1)
 
#define SPEAR1340_SATA_PCIE_CFG_MASK   0xF1F
 
#define SPEAR1340_PCIE_CFG_VAL
 
#define SPEAR1340_SATA_CFG_VAL
 
#define SPEAR1340_PCIE_MIPHY_CFG   (VA_MISC_BASE + 0x428)
 
#define SPEAR1340_MIPHY_OSC_BYPASS_EXT   (1 << 31)
 
#define SPEAR1340_MIPHY_CLK_REF_DIV2   (1 << 27)
 
#define SPEAR1340_MIPHY_CLK_REF_DIV4   (2 << 27)
 
#define SPEAR1340_MIPHY_CLK_REF_DIV8   (3 << 27)
 
#define SPEAR1340_MIPHY_PLL_RATIO_TOP(x)   (x << 0)
 
#define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA
 
#define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK   (SPEAR1340_MIPHY_PLL_RATIO_TOP(120))
 
#define SPEAR1340_PCIE_SATA_MIPHY_CFG_PCIE
 

Functions

void sata_miphy_exit (struct device *dev)
 
int sata_suspend (struct device *dev)
 
int sata_resume (struct device *dev)
 

Variables

 smp = smp_ops(spear13xx_smp_ops)
 
 map_io = spear13xx_map_io
 
 init_irq = spear13xx_dt_init_irq
 
 handle_irq = gic_handle_irq
 
 timer = &spear13xx_timer
 
 init_machine = spear1340_dt_init
 
 restart = spear_restart
 
 dt_compat = spear1340_dt_board_compat
 

Macro Definition Documentation

#define pr_fmt (   fmt)    "SPEAr1340: " fmt

Definition at line 14 of file spear1340.c.

#define SPEAR1340_MIPHY_CLK_REF_DIV2   (1 << 27)

Definition at line 67 of file spear1340.c.

#define SPEAR1340_MIPHY_CLK_REF_DIV4   (2 << 27)

Definition at line 68 of file spear1340.c.

#define SPEAR1340_MIPHY_CLK_REF_DIV8   (3 << 27)

Definition at line 69 of file spear1340.c.

#define SPEAR1340_MIPHY_OSC_BYPASS_EXT   (1 << 31)

Definition at line 66 of file spear1340.c.

#define SPEAR1340_MIPHY_PLL_RATIO_TOP (   x)    (x << 0)

Definition at line 70 of file spear1340.c.

#define SPEAR1340_PCIE_CFG_AUX_CLK_EN   (1 << 8)

Definition at line 46 of file spear1340.c.

#define SPEAR1340_PCIE_CFG_CORE_CLK_EN   (1 << 9)

Definition at line 45 of file spear1340.c.

#define SPEAR1340_PCIE_CFG_DEVICE_PRESENT   (1 << 11)

Definition at line 43 of file spear1340.c.

#define SPEAR1340_PCIE_CFG_POWERUP_RESET   (1 << 10)

Definition at line 44 of file spear1340.c.

#define SPEAR1340_PCIE_CFG_VAL
Value:
SPEAR1340_PCIE_CFG_AUX_CLK_EN | \
SPEAR1340_PCIE_CFG_CORE_CLK_EN | \
SPEAR1340_PCIE_CFG_POWERUP_RESET | \
SPEAR1340_PCIE_CFG_DEVICE_PRESENT)

Definition at line 54 of file spear1340.c.

#define SPEAR1340_PCIE_MIPHY_CFG   (VA_MISC_BASE + 0x428)

Definition at line 65 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_CFG   (VA_MISC_BASE + 0x424)

Definition at line 41 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_MIPHY_CFG_PCIE
Value:
SPEAR1340_MIPHY_PLL_RATIO_TOP(25))

Definition at line 77 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA
Value:
SPEAR1340_MIPHY_CLK_REF_DIV2 | \
SPEAR1340_MIPHY_PLL_RATIO_TOP(60))

Definition at line 71 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK   (SPEAR1340_MIPHY_PLL_RATIO_TOP(120))

Definition at line 75 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_SEL_PCIE   (0)

Definition at line 51 of file spear1340.c.

#define SPEAR1340_PCIE_SATA_SEL_SATA   (1)

Definition at line 52 of file spear1340.c.

#define SPEAR1340_PCM_CFG   (VA_MISC_BASE + 0x100)

Definition at line 32 of file spear1340.c.

#define SPEAR1340_PCM_WKUP_CFG   (VA_MISC_BASE + 0x104)

Definition at line 33 of file spear1340.c.

#define SPEAR1340_PERIP1_SW_RST   (VA_MISC_BASE + 0x318)

Definition at line 36 of file spear1340.c.

#define SPEAR1340_PERIP2_SW_RST   (VA_MISC_BASE + 0x31C)

Definition at line 37 of file spear1340.c.

#define SPEAR1340_PERIP3_SW_RST   (VA_MISC_BASE + 0x320)

Definition at line 38 of file spear1340.c.

#define SPEAR1340_SATA_BASE   UL(0xB1000000)

Definition at line 28 of file spear1340.c.

#define SPEAR1340_SATA_CFG_PM_CLK_EN   (1 << 1)

Definition at line 50 of file spear1340.c.

#define SPEAR1340_SATA_CFG_POWERUP_RESET   (1 << 2)

Definition at line 49 of file spear1340.c.

#define SPEAR1340_SATA_CFG_RX_CLK_EN   (1 << 3)

Definition at line 48 of file spear1340.c.

#define SPEAR1340_SATA_CFG_TX_CLK_EN   (1 << 4)

Definition at line 47 of file spear1340.c.

#define SPEAR1340_SATA_CFG_VAL
Value:
SPEAR1340_SATA_CFG_PM_CLK_EN | \
SPEAR1340_SATA_CFG_POWERUP_RESET | \
SPEAR1340_SATA_CFG_RX_CLK_EN | \
SPEAR1340_SATA_CFG_TX_CLK_EN)

Definition at line 59 of file spear1340.c.

#define SPEAR1340_SATA_PCIE_CFG_MASK   0xF1F

Definition at line 53 of file spear1340.c.

#define SPEAR1340_SWITCH_CTR   (VA_MISC_BASE + 0x108)

Definition at line 34 of file spear1340.c.

#define SPEAR1340_UART1_BASE   UL(0xB4100000)

Definition at line 29 of file spear1340.c.

Function Documentation

void sata_miphy_exit ( struct device dev)

Definition at line 120 of file spear1340.c.

int sata_resume ( struct device dev)

Definition at line 144 of file spear1340.c.

int sata_suspend ( struct device dev)

Definition at line 134 of file spear1340.c.

Variable Documentation

dt_compat = spear1340_dt_board_compat

Definition at line 192 of file spear1340.c.

handle_irq = gic_handle_irq

Definition at line 188 of file spear1340.c.

Definition at line 187 of file spear1340.c.

init_machine = spear1340_dt_init

Definition at line 190 of file spear1340.c.

map_io = spear13xx_map_io

Definition at line 186 of file spear1340.c.

restart = spear_restart

Definition at line 191 of file spear1340.c.

Definition at line 185 of file spear1340.c.

Definition at line 189 of file spear1340.c.