From 93f379e6cfadfded0d262192ca69d1abc096d90e Mon Sep 17 00:00:00 2001 From: Benn Pörscke Date: Fri, 16 Dec 2011 15:04:55 +0100 Subject: Squash Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015 --- include/linux/input/lps001wp.h | 2 - include/linux/ion.h | 9 ++- include/linux/kernel.h | 3 + include/linux/mfd/db8500-prcmu.h | 65 ++++++++++----------- include/linux/mfd/dbx500-prcmu.h | 118 +++++++++++++++++++++++++++++++++++++++ include/linux/mmc/card.h | 6 ++ include/linux/usb/gadget.h | 2 + include/linux/usb/otg_id.h | 6 ++ include/net/bluetooth/l2cap.h | 7 ++- 9 files changed, 176 insertions(+), 42 deletions(-) (limited to 'include') diff --git a/include/linux/input/lps001wp.h b/include/linux/input/lps001wp.h index aa5eac9af8f..779a415ea68 100644 --- a/include/linux/input/lps001wp.h +++ b/include/linux/input/lps001wp.h @@ -70,8 +70,6 @@ struct lps001wp_prs_platform_data { int (*init)(void); void (*exit)(void); - int (*power_on)(void); - int (*power_off)(void); }; diff --git a/include/linux/ion.h b/include/linux/ion.h index 111982f48dc..aed8349279e 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -186,9 +186,14 @@ void ion_unmap_dma(struct ion_client *client, struct ion_handle *handle); * @client: the client * @handle: the handle to share * - * Given a handle, return a buffer which exists in a global name - * space and can be passed to other clients. Should be passed into ion_import + * Given a handle, return a buffer, which exists in a global name + * space, and can be passed to other clients. Should be passed into ion_import * to obtain a new handle for this buffer. + * + * NOTE: This function does do not an extra reference. The burden is on the + * caller to make sure the buffer doesn't go away while it's being passed to + * another client. That is, ion_free should not be called on this handle until + * the buffer has been imported into the other client. */ struct ion_buffer *ion_share(struct ion_client *client, struct ion_handle *handle); diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 953352a8833..47e8dbea85c 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -736,4 +736,7 @@ extern int __build_bug_on_failed; # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD #endif +/* To identify board information in panic logs, set this */ +extern char *mach_panic_string; + #endif diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h index 7268ce92d54..41342dbad0d 100644 --- a/include/linux/mfd/db8500-prcmu.h +++ b/include/linux/mfd/db8500-prcmu.h @@ -11,6 +11,21 @@ #define __MFD_DB8500_PRCMU_H #include +#include + +/* + * Registers + */ +#define DB8500_PRCM_GPIOCR 0x138 +#define DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0 BIT(0) +#define DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD BIT(9) +#define DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 BIT(11) +#define DB8500_PRCM_GPIOCR_SPI2_SELECT BIT(23) + +#define DB8500_PRCM_DSI_SW_RESET 0x324 +#define DB8500_PRCM_DSI_SW_RESET_DSI0_SW_RESETN BIT(0) +#define DB8500_PRCM_DSI_SW_RESET_DSI1_SW_RESETN BIT(1) +#define DB8500_PRCM_DSI_SW_RESET_DSI2_SW_RESETN BIT(2) /* This portion previously known as */ @@ -519,12 +534,6 @@ int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); void prcmu_ac_wake_req(void); void prcmu_ac_sleep_req(void); void prcmu_modem_reset(void); -void prcmu_enable_spi2(void); -void prcmu_disable_spi2(void); -void prcmu_enable_stm_mod_uart(void); -void prcmu_disable_stm_mod_uart(void); -void prcmu_enable_stm_ape(void); -void prcmu_disable_stm_ape(void); int prcmu_config_a9wdog(u8 num, bool sleep_auto_off); int prcmu_enable_a9wdog(u8 id); @@ -552,6 +561,10 @@ int db8500_prcmu_get_ape_opp(void); int db8500_prcmu_set_ddr_opp(u8 opp); int db8500_prcmu_get_ddr_opp(void); +u32 db8500_prcmu_read(unsigned int reg); +void db8500_prcmu_write(unsigned int reg, u32 value); +void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value); + #else /* !CONFIG_MFD_DB8500_PRCMU */ static inline void db8500_prcmu_early_init(void) {} @@ -656,36 +669,6 @@ static inline void prcmu_ac_sleep_req(void) {} static inline void prcmu_modem_reset(void) {} -static inline int prcmu_enable_spi2(void) -{ - return 0; -} - -static inline int prcmu_disable_spi2(void) -{ - return 0; -} - -static inline int prcmu_enable_stm_mod_uart(void) -{ - return 0; -} - -static inline int prcmu_disable_stm_mod_uart(void) -{ - return 0; -} - -static inline int prcmu_enable_stm_ape(void) -{ - return 0; -} - -static inline int prcmu_disable_stm_ape(void) -{ - return 0; -} - static inline void db8500_prcmu_system_reset(u16 reset_code) {} static inline int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, @@ -775,6 +758,16 @@ static inline int db8500_prcmu_get_arm_opp(void) return 0; } +static inline u32 db8500_prcmu_read(unsigned int reg) +{ + return 0; +} + +static inline void db8500_prcmu_write(unsigned int reg, u32 value) {} + +static inline void db8500_prcmu_write_masked(unsigned int reg, u32 mask, + u32 value) {} + #endif /* !CONFIG_MFD_DB8500_PRCMU */ #endif /* __MFD_DB8500_PRCMU_H */ diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 43a62985b0a..693e7a4150a 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h @@ -464,6 +464,26 @@ static inline int prcmu_stop_temp_sense(void) return db8500_prcmu_stop_temp_sense(); } +static inline u32 prcmu_read(unsigned int reg) +{ + if (cpu_is_u8500()) + return db8500_prcmu_read(reg); + else + return 0; +} + +static inline void prcmu_write(unsigned int reg, u32 value) +{ + if (cpu_is_u8500()) + db8500_prcmu_write(reg, value); +} + +static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) +{ + if (cpu_is_u8500()) + db8500_prcmu_write_masked(reg, mask, value); +} + #else static inline void __init prcmu_early_init(void) {} @@ -613,6 +633,104 @@ static inline int prcmu_stop_temp_sense(void) return 0; } +static inline u32 prcmu_read(unsigned int reg) +{ + return 0; +} + +static inline void prcmu_write(unsigned int reg, u32 value) {} + +static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {} + +#endif + +static inline void prcmu_set(unsigned int reg, u32 bits) +{ + prcmu_write_masked(reg, bits, bits); +} + +static inline void prcmu_clear(unsigned int reg, u32 bits) +{ + prcmu_write_masked(reg, bits, 0); +} + +#if defined(CONFIG_UX500_SOC_DB8500) || defined(CONFIG_UX500_SOC_DB5500) + +/** + * prcmu_enable_spi2 - Enables pin muxing for SPI2 on OtherAlternateC1. + */ +static inline void prcmu_enable_spi2(void) +{ + if (cpu_is_u8500()) + prcmu_set(DB8500_PRCM_GPIOCR, DB8500_PRCM_GPIOCR_SPI2_SELECT); +} + +/** + * prcmu_disable_spi2 - Disables pin muxing for SPI2 on OtherAlternateC1. + */ +static inline void prcmu_disable_spi2(void) +{ + if (cpu_is_u8500()) + prcmu_clear(DB8500_PRCM_GPIOCR, DB8500_PRCM_GPIOCR_SPI2_SELECT); +} + +/** + * prcmu_enable_stm_mod_uart - Enables pin muxing for STMMOD + * and UARTMOD on OtherAlternateC3. + */ +static inline void prcmu_enable_stm_mod_uart(void) +{ + if (cpu_is_u8500()) { + prcmu_set(DB8500_PRCM_GPIOCR, + (DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 | + DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0)); + } +} + +/** + * prcmu_disable_stm_mod_uart - Disables pin muxing for STMMOD + * and UARTMOD on OtherAlternateC3. + */ +static inline void prcmu_disable_stm_mod_uart(void) +{ + if (cpu_is_u8500()) { + prcmu_clear(DB8500_PRCM_GPIOCR, + (DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 | + DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0)); + } +} + +/** + * prcmu_enable_stm_ape - Enables pin muxing for STM APE on OtherAlternateC1. + */ +static inline void prcmu_enable_stm_ape(void) +{ + if (cpu_is_u8500()) { + prcmu_set(DB8500_PRCM_GPIOCR, + DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD); + } +} + +/** + * prcmu_disable_stm_ape - Disables pin muxing for STM APE on OtherAlternateC1. + */ +static inline void prcmu_disable_stm_ape(void) +{ + if (cpu_is_u8500()) { + prcmu_clear(DB8500_PRCM_GPIOCR, + DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD); + } +} + +#else + +static inline void prcmu_enable_spi2(void) {} +static inline void prcmu_disable_spi2(void) {} +static inline void prcmu_enable_stm_mod_uart(void) {} +static inline void prcmu_disable_stm_mod_uart(void) {} +static inline void prcmu_enable_stm_ape(void) {} +static inline void prcmu_disable_stm_ape(void) {} + #endif /* PRCMU QoS APE OPP class */ diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index f56ffc70382..b072bce633f 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -213,6 +213,7 @@ struct mmc_card { #define MMC_QUIRK_INAND_CMD38 (1<<6) /* iNAND devices have broken CMD38 */ #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in byte mode */ +#define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ unsigned int erase_size; /* erase size in sectors */ unsigned int erase_shift; /* if erase unit is power 2 */ @@ -424,6 +425,11 @@ static inline int mmc_card_broken_byte_mode_512(const struct mmc_card *c) return c->quirks & MMC_QUIRK_BROKEN_BYTE_MODE_512; } +static inline int mmc_card_long_read_time(const struct mmc_card *c) +{ + return c->quirks & MMC_QUIRK_LONG_READ_TIME; +} + #define mmc_card_name(c) ((c)->cid.prod_name) #define mmc_card_id(c) (dev_name(&(c)->dev)) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index dd1571db55e..5802cb09fda 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -430,6 +430,8 @@ struct usb_gadget_ops { int (*pullup) (struct usb_gadget *, int is_on); int (*ioctl)(struct usb_gadget *, unsigned code, unsigned long param); + struct usb_ep* (*configure_ep)(struct usb_gadget *, u8 type, + struct usb_endpoint_descriptor *); }; /** diff --git a/include/linux/usb/otg_id.h b/include/linux/usb/otg_id.h index b686ab06795..46a44637c11 100644 --- a/include/linux/usb/otg_id.h +++ b/include/linux/usb/otg_id.h @@ -28,6 +28,10 @@ * get called first. * @detect: Called during otg_id_notify. Return OTG_ID_HANDLED if the USB cable * has been identified + * @proxy_wait: Called during otg_id_notify if a previous handler returns + * OTG_ID_PROXY_WAIT. This should wait on ID change then call otg_id_notify. + * This is used when a handler knows what's connected but can't detect + * the change itself. * @cancel: Called after detect has returned OTG_ID_HANDLED to ask it to * release detection resources to allow a new identification to occur. */ @@ -35,10 +39,12 @@ struct otg_id_notifier_block { int priority; int (*detect)(struct otg_id_notifier_block *otg_id_nb); + int (*proxy_wait)(struct otg_id_notifier_block *otg_id_nb); void (*cancel)(struct otg_id_notifier_block *otg_id_nb); struct plist_node p; }; +#define OTG_ID_PROXY_WAIT 2 #define OTG_ID_HANDLED 1 #define OTG_ID_UNHANDLED 0 diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 578545a2a49..8e85fb32a5f 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -39,8 +39,11 @@ #define L2CAP_DEFAULT_ACK_TO 200 #define L2CAP_LE_DEFAULT_MTU 23 -#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ -#define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ +#define L2CAP_DISC_TIMEOUT (100) +#define L2CAP_DISC_REJ_TIMEOUT (5000) /* 5 seconds */ +#define L2CAP_ENC_TIMEOUT (5000) /* 5 seconds */ +#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ +#define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ /* L2CAP socket address */ struct sockaddr_l2 { -- cgit v1.2.3