Skip to content

Commit

Permalink
Merge tags 'edison-added', 'edison-deleted' and 'edison-modified' int…
Browse files Browse the repository at this point in the history
…o yocto-edison-3.10
  • Loading branch information
esialb committed Jan 2, 2016
3 parents 21c7b69 + 76ecc15 + 607d4d2 commit 1350998
Show file tree
Hide file tree
Showing 221 changed files with 15,296 additions and 8,173 deletions.
6 changes: 3 additions & 3 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3345,11 +3345,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
default x2apic cluster mode on platforms
supporting x2apic.

x86_mrst_timer= [X86-32,APBT]
Choose timer option for x86 Moorestown MID platform.
x86_intel_mid_timer= [X86-32,APBT]
Choose timer option for x86 Intel MID platform.
Two valid options are apbt timer only and lapic timer
plus one apbt timer for broadcast timer.
x86_mrst_timer=apbt_only | lapic_and_apbt
x86_intel_mid_timer=apbt_only | lapic_and_apbt

xen_emul_unplug= [HW,X86,XEN]
Unplug Xen emulated devices
Expand Down
62 changes: 54 additions & 8 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -442,29 +442,65 @@ config X86_WANT_INTEL_MID
if X86_WANT_INTEL_MID

config X86_INTEL_MID
bool

config X86_MDFLD
bool "Medfield MID platform"
bool "Intel MID platform"
depends on PCI
depends on PCI_GOANY
depends on X86_IO_APIC
select X86_INTEL_MID
select SFI
select INTEL_SCU_IPC
select X86_PLATFORM_DEVICES
select ARCH_HAVE_CUSTOM_GPIO_H
---help---
Intel MID is Intel's Low Power Intel Architecture (LPIA) based Mobile
Internet Device(MID) platform.
Unlike standard x86 PCs, Intel MID does not have many legacy devices
nor standard legacy replacement devices/features. e.g. It does not
contain i8259, i8254, HPET, legacy BIOS, most of the io ports.

config X86_MDFLD
bool "Medfield MID platform"
depends on X86_INTEL_MID
select DW_APB_TIMER
select APB_TIMER
select I2C
select SPI
select INTEL_SCU_IPC
select X86_PLATFORM_DEVICES
select MFD_INTEL_MSIC
---help---
Medfield is Intel's Low Power Intel Architecture (LPIA) based Moblin
Internet Device(MID) platform.
Internet Device(MID) platform.
Unlike standard x86 PCs, Medfield does not have many legacy devices
nor standard legacy replacement devices/features. e.g. Medfield does
not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.

config ATOM_SOC_POWER
bool "Select Atom SOC Power"

choice
prompt "Select PMU support"
depends on ATOM_SOC_POWER
default REMOVEME_INTEL_ATOM_MDFLD_POWER

config REMOVEME_INTEL_ATOM_MDFLD_POWER
bool "Medfield"

config REMOVEME_INTEL_ATOM_CLV_POWER
bool "Clovertrail"

config REMOVEME_INTEL_ATOM_MRFLD_POWER
bool "Merrifield"

endchoice

config INTEL_DEBUG_FEATURE
bool "Debug feature interface on Intel MID platform"
depends on X86_INTEL_MID
---help---
Provides an interface to list the debug features
that are enabled on an Intel MID platform. The
enabling of the debug features depends on the mode
the device is in (e.g. manufacturing, production,
end user, etc...).

endif

config X86_INTEL_LPSS
Expand Down Expand Up @@ -723,6 +759,16 @@ config APB_TIMER
as it is off-chip. APB timers are always running regardless of CPU
C states, they are used as per CPU clockevent device when possible.

config ARCH_NR_GPIO
int
depends on ARCH_HAVE_CUSTOM_GPIO_H
default 512 if X86_INTEL_MID
default 0
help
Maximum number of GPIOs in the system.

If unsure, leave the default value.

# Mark as expert because too many people got it wrong.
# The code disables itself when not needed.
config DMI
Expand Down
19 changes: 14 additions & 5 deletions arch/x86/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ config MATOM
accordingly optimized code. Use a recent GCC with specific Atom
support in order to fully benefit from selecting this option.

config MSLM
bool "Intel Silvermont (Atom)"
---help---

Select this for the Intel Silvermont (Atom) platform. Intel Atom
CPUs have an in-order pipelining architecture and thus can benefit
from accordingly optimized code. Use a recent GCC with specific
Atom support in order to fully benefit from selecting this option.

config GENERIC_CPU
bool "Generic-x86-64"
depends on X86_64
Expand Down Expand Up @@ -300,7 +309,7 @@ config X86_INTERNODE_CACHE_SHIFT
config X86_L1_CACHE_SHIFT
int
default "7" if MPENTIUM4 || MPSC
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MSLM || MVIAC7 || X86_GENERIC || GENERIC_CPU
default "4" if MELAN || M486 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX

Expand Down Expand Up @@ -335,7 +344,7 @@ config X86_INTEL_USERCOPY

config X86_USE_PPRO_CHECKSUM
def_bool y
depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM || MSLM

config X86_USE_3DNOW
def_bool y
Expand Down Expand Up @@ -363,17 +372,17 @@ config X86_P6_NOP

config X86_TSC
def_bool y
depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64
depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM || MSLM) && !X86_NUMAQ) || X86_64

config X86_CMPXCHG64
def_bool y
depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM || MSLM

# this should be set for all -march=.. options where the compiler
# generates cmov.
config X86_CMOV
def_bool y
depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MSLM || MGEODE_LX)

config X86_MINIMUM_CPU_FAMILY
int
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ else
$(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
cflags-$(CONFIG_MSLM) += $(call cc-option,-march=slm) \
$(call cc-option,-mtune=slm,$(call cc-option,-mtune=generic))
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
KBUILD_CFLAGS += $(cflags-y)

Expand Down
2 changes: 2 additions & 0 deletions arch/x86/Makefile_32.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ cflags-$(CONFIG_MVIAC7) += -march=i686
cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
cflags-$(CONFIG_MSLM) += $(call cc-option,-march=slm,$(call cc-option,-march=core2,-march=i686)) \
$(call cc-option,-mtune=slm,$(call cc-option,-mtune=generic))

# AMD Elan support
cflags-$(CONFIG_MELAN) += -march=i486
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/apb_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extern int sfi_mtimer_num;

static inline unsigned long apbt_quick_calibrate(void) {return 0; }
static inline void apbt_time_init(void) { }
static inline void apbt_setup_secondary_clock(void) { }

#endif
#endif /* ASM_X86_APBT_H */
1 change: 1 addition & 0 deletions arch/x86/include/asm/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ enum fixed_addresses {
FIX_TEXT_POKE0, /* first page is last, because allocation is backward */
#ifdef CONFIG_X86_INTEL_MID
FIX_LNW_VRTC,
FIX_CLOCK_CTL,
#endif
__end_of_permanent_fixed_addresses,

Expand Down
23 changes: 23 additions & 0 deletions arch/x86/include/asm/gpio.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
#ifndef _ARCH_X86_GPIO_H
#define _ARCH_X86_GPIO_H

#if CONFIG_ARCH_HAVE_CUSTOM_GPIO_H

#if CONFIG_ARCH_NR_GPIO > 0
#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
#endif

#include <asm-generic/gpio.h>

/* The trivial gpiolib dispatchers */
#define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value
#define gpio_cansleep __gpio_cansleep
#define gpio_to_irq __gpio_to_irq

#else /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */

#ifndef __LINUX_GPIO_H
#warning Include linux/gpio.h instead of asm/gpio.h
#include <linux/gpio.h>
#endif

#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */

#endif /* _ARCH_X86_GPIO_H */
105 changes: 70 additions & 35 deletions arch/x86/include/asm/intel_scu_ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,88 @@
#define _ASM_X86_INTEL_SCU_IPC_H_

#include <linux/notifier.h>
#include <asm/intel-mid.h>

/* IPC defines the following message types */
#define IPCMSG_GET_HOBADDR 0xE5 /* OSHOB access. */
#define IPCMSG_BATTERY 0xEF /* Coulomb Counter Accumulator */
#define IPCMSG_MIP_ACCESS 0xEC /* IA MIP access */
#define IPCMSG_PMDB_CMD 0xE0
#define IPCMSG_WARM_RESET 0xF0
#define IPCMSG_COLD_RESET 0xF1
#define IPCMSG_SOFT_RESET 0xF2
#define IPCMSG_COLD_BOOT 0xF3

#define IPCMSG_COLD_OFF 0x80 /* for TNG only */
#define IPCMSG_FW_REVISION 0xF4 /* Get firmware revision */
#define IPCMSG_SHIM_CONFIG 0xF5 /* Configure SHIM */
#define IPCMSG_WATCHDOG_TIMER 0xF8 /* Set Kernel Watchdog Threshold */
#define IPCMSG_VRTC 0xFA /* Set vRTC device */
/* Command id associated with message IPCMSG_VRTC */
#define IPC_CMD_VRTC_SETTIME 1 /* Set time */
#define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */

/* Read single register */
int intel_scu_ipc_ioread8(u16 addr, u8 *data);

/* Read two sequential registers */
int intel_scu_ipc_ioread16(u16 addr, u16 *data);

/* Read four sequential registers */
int intel_scu_ipc_ioread32(u16 addr, u32 *data);

/* Read a vector */
int intel_scu_ipc_readv(u16 *addr, u8 *data, int len);

/* Write single register */
int intel_scu_ipc_iowrite8(u16 addr, u8 data);
#define IPCMSG_FW_UPDATE 0xFE /* Firmware update */
#define IPCMSG_PCNTRL 0xFF /* Power controller unit read/write */
#define IPCMSG_OSC_CLK 0xE6 /* Turn on/off osc clock */
#define IPCMSG_S0IX_COUNTER 0xEB /* Get S0ix residency */
#define IPCMSG_CLEAR_FABERROR 0xE3 /* Clear fabric error log */
#define IPCMSG_STORE_NV_DATA 0xCD /* Store the Non Volatile data to RAM */

#define IPC_CMD_UMIP_RD 0
#define IPC_CMD_UMIP_WR 1
#define IPC_CMD_SMIP_RD 2

/* Command id associated with message IPCMSG_PCNTRL */
#define IPC_CMD_PCNTRL_W 0 /* Register write */
#define IPC_CMD_PCNTRL_R 1 /* Register read */
#define IPC_CMD_PCNTRL_M 2 /* Register read-modify-write */

#define IPC_ERR_NONE 0
#define IPC_ERR_CMD_NOT_SUPPORTED 1
#define IPC_ERR_CMD_NOT_SERVICED 2
#define IPC_ERR_UNABLE_TO_SERVICE 3
#define IPC_ERR_CMD_INVALID 4
#define IPC_ERR_CMD_FAILED 5
#define IPC_ERR_EMSECURITY 6
#define IPC_ERR_UNSIGNEDKERNEL 7

#define MSIC_DEBUG_FILE "msic"
#define MSIC_ALL_DEBUG_FILE "msic_all"
#define MAX_MSIC_REG 0x3FF
#define MIN_MSIC_REG 0x0



/* Command id associated with message IPCMSG_VRTC */
#define IPC_CMD_VRTC_SETTIME 1 /* Set time */
#define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */
#define IPC_CMD_VRTC_SYNC_RTC 3 /* Sync MSIC/PMIC RTC to VRTC */

/* Command id associated with message IPCMSG_SHIM_CONFIG */
#define IPC_CMD_SHIM_RD 0 /* SHIM read */
#define IPC_CMD_SHIM_WR 1 /* SHIM write */

/* check ipc status */
int intel_scu_ipc_check_status(void);

/* Write two sequential registers */
int intel_scu_ipc_iowrite16(u16 addr, u16 data);
/* I2C control api */
int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);

/* Write four sequential registers */
int intel_scu_ipc_iowrite32(u16 addr, u32 data);
/* Update FW version */
int intel_scu_ipc_fw_update(void);
int intel_scu_ipc_mrstfw_update(u8 *buffer, u32 length);
int intel_scu_ipc_medfw_prepare(void __user *arg);

/* Write a vector */
int intel_scu_ipc_writev(u16 *addr, u8 *data, int len);
int intel_scu_ipc_read_mip(u8 *data, int len, int offset, int issigned);
int intel_scu_ipc_write_umip(u8 *data, int len, int offset);

/* Update single register based on the mask */
int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask);
/* NVRAM access */
u32 intel_scu_ipc_get_nvram_size(void);
u32 intel_scu_ipc_get_nvram_addr(void);

/* Issue commands to the SCU with or without data */
int intel_scu_ipc_simple_command(int cmd, int sub);
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
u32 *out, int outlen);
/* I2C control api */
int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);
/* Penwell has 4 osc clocks */
#define OSC_CLK_AUDIO 0 /* Audio */
#define OSC_CLK_CAM0 1 /* Primary camera */
#define OSC_CLK_CAM1 2 /* Secondary camera */
#define OSC_CLK_DISP 3 /* Display buffer */

/* Update FW version */
int intel_scu_ipc_fw_update(u8 *buffer, u32 length);
int intel_scu_ipc_osc_clk(u8 clk, unsigned int khz);

extern struct blocking_notifier_head intel_scu_notifier;

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define MODULE_PROC_FAMILY "586MMX "
#elif defined CONFIG_MCORE2
#define MODULE_PROC_FAMILY "CORE2 "
#elif defined CONFIG_MATOM
#elif (defined CONFIG_MATOM) || (defined CONFIG_MSLM)
#define MODULE_PROC_FAMILY "ATOM "
#elif defined CONFIG_M686
#define MODULE_PROC_FAMILY "686 "
Expand Down
9 changes: 0 additions & 9 deletions arch/x86/include/asm/mrst-vrtc.h

This file was deleted.

Loading

0 comments on commit 1350998

Please sign in to comment.