[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1419337623-16101-2-git-send-email-aleksey.makarov@auriga.com>
Date: Tue, 23 Dec 2014 15:26:59 +0300
From: Aleksey Makarov <aleksey.makarov@...iga.com>
To: <linux-mips@...ux-mips.org>
CC: <linux-kernel@...r.kernel.org>,
David Daney <david.daney@...ium.com>,
Aleksey Makarov <aleksey.makarov@...iga.com>,
Chandrakala Chavva <cchavva@...iumnetworks.com>,
Ralf Baechle <ralf@...ux-mips.org>
Subject: [PATCH 1/3] MIPS: OCTEON: Add semaphore to serialize bootbus accesses.
From: David Daney <david.daney@...ium.com>
Some hardware blocks attached to the OCTEON bootbus run asynchronously
to accesses from the CPUs. These include MMC/SD host, CF(when using
DMA), and NAND controller. A bus error, or corrupt data may occur if
a CPU is trying to access a bootbus connected device at the same time
the bus is running asynchronous operations.
To work around these problems we add this semaphore that must be
acquired before initiating bootbus activity. Subsequent patches will
add users for this.
Signed-off-by: David Daney <david.daney@...ium.com>
[aleksey.makarov@...iga.com: combine the patches]
Signed-off-by: Aleksey Makarov <aleksey.makarov@...iga.com>
Signed-off-by: Chandrakala Chavva <cchavva@...iumnetworks.com>
---
arch/mips/cavium-octeon/setup.c | 3 +++
arch/mips/include/asm/octeon/octeon.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index 94f888d..7311338 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -50,6 +50,9 @@ extern void pci_console_init(const char *arg);
static unsigned long long MAX_MEMORY = 512ull << 20;
+DEFINE_SEMAPHORE(octeon_bootbus_sem);
+EXPORT_SYMBOL(octeon_bootbus_sem);
+
struct octeon_boot_descriptor *octeon_boot_desc_ptr;
struct cvmx_bootinfo *octeon_bootinfo;
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h
index d781f9e..8e4e4db 100644
--- a/arch/mips/include/asm/octeon/octeon.h
+++ b/arch/mips/include/asm/octeon/octeon.h
@@ -252,4 +252,6 @@ void octeon_irq_set_ip4_handler(octeon_irq_ip4_handler_t);
extern void octeon_fixup_irqs(void);
+extern struct semaphore octeon_bootbus_sem;
+
#endif /* __ASM_OCTEON_OCTEON_H */
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists