diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/plat/board-tuna-bluetooth.h | 30 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/memory.h | 12 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hsi.h | 50 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/uncompress.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_rpmsg.c | 20 |
5 files changed, 92 insertions, 21 deletions
diff --git a/arch/arm/plat-omap/include/plat/board-tuna-bluetooth.h b/arch/arm/plat-omap/include/plat/board-tuna-bluetooth.h new file mode 100644 index 0000000..c74de05 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/board-tuna-bluetooth.h @@ -0,0 +1,30 @@ +/* + * Bluetooth Broadcomm and low power control via GPIO + * + * Copyright (C) 2011 Samsung, Inc. + * Copyright (C) 2011 Google, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __BOARD_TUNA_BLUETOOTH_H__ +#define __BOARD_TUNA_BLUETOOTH_H__ + +#include <linux/serial_core.h> + +extern void bcm_bt_lpm_exit_lpm_locked(struct uart_port *uport); + +#endif /* __BOARD_TUNA_BLUETOOTH_H__ */ diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h index e6720aa..0c7260a 100644 --- a/arch/arm/plat-omap/include/plat/memory.h +++ b/arch/arm/plat-omap/include/plat/memory.h @@ -86,17 +86,7 @@ #endif /* CONFIG_ARCH_OMAP15XX */ /* Override the ARM default */ -#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE - -#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0) -#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE -#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2 -#endif - -#define CONSISTENT_DMA_SIZE \ - (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024) - -#endif +#define CONSISTENT_DMA_SIZE (14 * SZ_1M) #endif diff --git a/arch/arm/plat-omap/include/plat/omap_hsi.h b/arch/arm/plat-omap/include/plat/omap_hsi.h index 1a75ed4..ce9dadf 100644 --- a/arch/arm/plat-omap/include/plat/omap_hsi.h +++ b/arch/arm/plat-omap/include/plat/omap_hsi.h @@ -135,10 +135,11 @@ #define HSI_SSI_WAKE_MASK 0xff /* for SSI */ #define HSI_WAKE_MASK 0xffff /* for HSI */ #define HSI_SET_WAKE_4_WIRES (0 << 16) +#define HSI_SET_WAKE_3_WIRES (1 << 16) +#define HSI_SET_WAKE_3_WIRES_MASK 0xfffcffff /* 3-wires + ACREADY to 1 */ #define HSI_SET_WAKE_READY_LVL_0 (0 << 17) -#define HSI_SET_WAKE(channel) (1 << (channel) |\ - HSI_SET_WAKE_4_WIRES |\ - HSI_SET_WAKE_READY_LVL_0) +#define HSI_SET_WAKE_READY_LVL_1 (1 << 17) +#define HSI_SET_WAKE(channel) (1 << (channel)) #define HSI_CLEAR_WAKE(channel) (1 << (channel)) #define HSI_WAKE(channel) (1 << (channel)) @@ -259,6 +260,11 @@ #define HSI_HSR_ERROR_TBE (1 << 4) /* HSI only */ #define HSI_HSR_ERROR_RME (1 << 7) /* HSI only */ #define HSI_HSR_ERROR_TME (1 << 11) /* HSI only */ +#define HSI_HSR_ERROR_ALL (HSI_HSR_ERROR_SIG | \ + HSI_HSR_ERROR_FTE | \ + HSI_HSR_ERROR_TBE | \ + HSI_HSR_ERROR_RME | \ + HSI_HSR_ERROR_TME) #define HSI_HSR_ERRORACK_REG(port) (HSI_HSR_BASE(port) + 0x0024) @@ -268,6 +274,7 @@ #define HSI_HSR_OVERRUNACK_REG(port) (HSI_HSR_BASE(port) + 0x0030) +/* HSR_COUNTERS_Pp is former SSI_TIMEOUT_REG */ #define HSI_HSR_COUNTERS_REG(port) (HSI_HSR_BASE(port) + 0x0034) #define SSI_TIMEOUT_REG(port) (HSI_HSR_COUNTERS_REG(port)) #define HSI_TIMEOUT_DEFAULT 0 /* SSI only */ @@ -287,6 +294,7 @@ (((FB << HSI_COUNTERS_FB_OFFSET) & HSI_COUNTERS_FB_MASK) \ ((TB << HSI_COUNTERS_TB_OFFSET) & HSI_COUNTERS_TB_MASK) \ ((FT << HSI_COUNTERS_FT_OFFSET) & HSI_COUNTERS_FT_MASK)) +/* For SSI */ #define SSI_SSR_COMBINE_COUNTERS(FT) \ ((FT << HSI_SSI_RX_TIMEOUT_OFFSET) & HSI_SSI_RX_TIMEOUT_MASK) @@ -454,9 +462,34 @@ HSI_SYS_MPU_U_ENABLE_REG(port, irq)) #define HSI_SYS_MPU_STATUS_CH_REG(port, irq, channel) \ - ((channel < HSI_SSI_CHANNELS_MAX) ? \ + (((channel) < HSI_SSI_CHANNELS_MAX) ? \ HSI_SYS_MPU_STATUS_REG(port, irq) : \ HSI_SYS_MPU_U_STATUS_REG(port, irq)) + + +/* HSI errata handling */ +#define IS_HSI_ERRATA(errata, id) (errata & (id)) +#define SET_HSI_ERRATA(errata, id) (errata |= (id)) + +/* HSI-C1BUG00088: i696: HSI: Issue with SW reset + * No recovery from SW reset under specific circumstances + * If a SW RESET is done while some HSI errors are still not + * acknowledged, the HSR FSM is stucked. */ +#define HSI_ERRATUM_i696_SW_RESET_FSM_STUCK BIT(0) + +/* HSI-C1BUG00085: ixxx: HSI wakeup issue in 3 wires mode + * HSI will NOT generate the Swakeup for 2nd frame if it entered + * IDLE after 1st received frame */ +#define HSI_ERRATUM_ixxx_3WIRES_NO_SWAKEUP BIT(1) + +/* +* HSI - OMAP4430-2.2BUG00055: i702 +* HSI: DSP Swakeup generated is the same than MPU Swakeup. +* System cannot enter in off mode due to the DSP. +*/ +#define HSI_ERRATUM_i702_PM_HSI_SWAKEUP BIT(2) + + /** * struct omap_ssi_config - SSI board configuration * @num_ports: Number of ports in use @@ -479,16 +512,15 @@ extern int omap_hsi_config(struct omap_hsi_board_config *hsi_config); #ifdef CONFIG_OMAP_HSI extern int omap_hsi_prepare_suspend(int hsi_port, bool dev_may_wakeup); -extern int omap_hsi_prepare_idle(void); +extern int omap_hsi_io_wakeup_check(void); extern int omap_hsi_wakeup(int hsi_port); -extern int omap_hsi_is_io_wakeup_from_hsi(void); +extern bool omap_hsi_is_io_wakeup_from_hsi(int *hsi_port); #else inline int omap_hsi_prepare_suspend(int hsi_port, bool dev_may_wakeup) { return -ENOSYS; } -inline int omap_hsi_prepare_idle(void) { return -ENOSYS; } +inline int omap_hsi_io_wakeup_check(void) { return -ENOSYS; } inline int omap_hsi_wakeup(int hsi_port) { return -ENOSYS; } -inline int omap_hsi_is_io_wakeup_from_hsi(void) { return -ENOSYS; } - +inline bool omap_hsi_is_io_wakeup_from_hsi(int *hsi_port) { return false; } #endif #endif /* __OMAP_HSI_H__ */ diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index ac4b60d..cf07178 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h @@ -164,6 +164,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id) /* omap4 based boards using UART3 */ DEBUG_LL_OMAP4(3, omap_4430sdp); DEBUG_LL_OMAP4(3, omap4_panda); + DEBUG_LL_OMAP4(3, tuna); /* zoom2/3 external uart */ DEBUG_LL_ZOOM(omap_zoom2); diff --git a/arch/arm/plat-omap/omap_rpmsg.c b/arch/arm/plat-omap/omap_rpmsg.c index 3653833..269f206 100644 --- a/arch/arm/plat-omap/omap_rpmsg.c +++ b/arch/arm/plat-omap/omap_rpmsg.c @@ -47,6 +47,7 @@ struct omap_rpmsg_vproc { char *mbox_name; char *rproc_name; struct omap_mbox *mbox; + struct mutex lock; struct rproc *rproc; struct notifier_block nb; struct notifier_block rproc_nb; @@ -145,13 +146,25 @@ static void omap_rpmsg_notify(struct virtqueue *vq) { struct omap_rpmsg_vq_info *rpvq = vq->priv; int ret; + int count = 5; pr_debug("sending mailbox msg: %d\n", rpvq->vq_id); - rproc_last_busy(rpvq->rpdev->rproc); + do { + rproc_last_busy(rpvq->rpdev->rproc); + mutex_lock(&rpvq->rpdev->lock); + if (rpvq->rpdev->mbox) + break; + mutex_unlock(&rpvq->rpdev->lock); + } while (--count); + if (!count) { + pr_err("mbox handle is NULL\n"); + return; + } /* send the index of the triggered virtqueue as the mailbox payload */ ret = omap_mbox_msg_send(rpvq->rpdev->mbox, rpvq->vq_id); if (ret) pr_err("ugh, omap_mbox_msg_send() failed: %d\n", ret); + mutex_unlock(&rpvq->rpdev->lock); } static int omap_rpmsg_mbox_callback(struct notifier_block *this, @@ -228,18 +241,22 @@ static int rpmsg_rproc_suspend(struct omap_rpmsg_vproc *rpdev) static int rpmsg_rproc_pos_suspend(struct omap_rpmsg_vproc *rpdev) { + mutex_lock(&rpdev->lock); if (rpdev->mbox) { omap_mbox_put(rpdev->mbox, &rpdev->nb); rpdev->mbox = NULL; } + mutex_unlock(&rpdev->lock); return NOTIFY_DONE; } static int rpmsg_rproc_resume(struct omap_rpmsg_vproc *rpdev) { + mutex_lock(&rpdev->lock); if (!rpdev->mbox) rpdev->mbox = omap_mbox_get(rpdev->mbox_name, &rpdev->nb); + mutex_unlock(&rpdev->lock); return NOTIFY_DONE; } @@ -315,6 +332,7 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev, /* system-wide unique id for this virtqueue */ rpvq->vq_id = rpdev->base_vq_id + index; rpvq->rpdev = rpdev; + mutex_init(&rpdev->lock); return vq; |