- 04 4月, 2013 4 次提交
-
-
由 Jon Hunter 提交于
When booting with device-tree, retrieve GPMC settings for ONENAND from the device-tree blob. This will allow us to remove all static settings stored in the gpmc-nand.c in the future once the migration to device-tree is complete. The user must now specify the ONENAND device width in the device-tree binding so that the GPMC can be programmed correctly. Therefore, update the device-tree binding documentation for ONENAND devices connected to the GPMC to reflect this. Please note that this does not include GPMC timings for ONENAND. The timings are being calculated at runtime. There is some legacy code that only enables read wait monitoring for non-OMAP3 devices. There are no known OMAP3 device issues that prevent this feature being enabled and so when booting with device-tree use the wait-monitoring settings described in the device-tree blob. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
When booting with device-tree, retrieve GPMC settings for NAND from the device-tree blob. This will allow us to remove all static settings stored in the gpmc-nand.c in the future once the migration to device-tree is complete. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
NOR flash is not currently supported when booting with device-tree on OMAP2+ devices. Add support to detect and configure NOR devices when booting with device-tree. Add documentation for the TI GPMC NOR binding. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
Some of the GPMC timings parameters are currently missing from the GPMC device-tree binding. Add these parameters to the binding documentation as well as code to read them. Also add either "-ps" or "-ns" suffix to the GPMC timing properties to indicate whether the timing is in picoseconds or nanoseconds. The existing code in gpmc_read_timings_dt() is checking the value of of_property_read_u32() and only is successful storing the value read in the gpmc_timings structure. Checking the return value in this case is not necessary and we can simply read the value, if present, and store directly in the gpmc_timings structure. Therefore, simplify the code by removing these checks. The comment in the gpmc_read_timings_dt() function, "only for OMAP3430" is also incorrect as it is applicable to all OMAP3+ devices. So correct this too. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
- 02 4月, 2013 19 次提交
-
-
由 Jon Hunter 提交于
Adds a function to read the various GPMC chip-select settings from device-tree and store them in the gpmc_settings structure. Update the GPMC device-tree binding documentation to describe these options. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
With the addition of the gpmc_cs_program_settings(), we no longer need or use gpmc_cs_configure() to configure some of the GPMC chip-select options. So rename the function to gpmc_configure() and remove code that modifies options in the CONFIG1 register. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
Convert the OMAP2+ TUSB code to use the gpmc_cs_program_settings() function for configuring the various GPMC options instead of directly programming the CONFIG1 register. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
Convert the OMAP2+ SMC91x code to use the gpmc_cs_program_settings() function for configuring the various GPMC options instead of directly programming the CONFIG1 register. Move configuration of the GPMC settings outside retime function and this does not need to be done if the timings are changed dynamically at runtime. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
Convert the OMAP2+ NAND code to use the gpmc_cs_program_settings() function for configuring the various GPMC options instead of directly programming the CONFIG1 register. This moves the configuration of some GPMC options outside the nand_gpmc_retime() because these options should only need to be set once regardless of whether the gpmc timing is changing dynamically at runtime. The programming of where the wait-pin is also moved slightly, but this will not have any impact to existing devices as no boards are currently setting the dev_ready variable. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
Convert the OMAP2+ ONENAND code to use the gpmc_cs_program_settings() function for configuring the various GPMC options instead of directly programming the CONFIG1 register. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
The GPMC has various different configuration options such as bus-width, synchronous or asychronous mode selection, burst mode options etc. Currently, there is no common function for configuring these options and various devices set these options by either programming the GPMC CONFIG1 register directly or by calling gpmc_cs_configure() to set some of the options. Add a new function for configuring all of the GPMC options. Having a common function for configuring this options will simplify code and ease the migration to device-tree. Also add a new capability flag to detect devices that support the address-address-data multiplexing mode. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
The GPMC has various different configuration options such as bus-width, synchronous or asychronous mode selection, burst mode options etc. Currently, there is no central structure for storing all these options when configuring the GPMC for a given device. Some of the options are stored in the GPMC timing structure and some are directly programmed into the GPMC configuration register. Add a new structure to store these options and convert code to use this structure. Adding this structure will allow us to create a common function for configuring these options. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
The GPMC has wait-pin signals that can be assigned to a chip-select to monitor the ready signal of an external device. Add a variable to indicate the total number of wait-pins for a given device. This will allow us to detect if the wait-pin being selected is valid or not. When booting with device-tree read the number of wait-pins from the device-tree blob. When device-tree is not used set the number of wait-pins to 4 which is valid for OMAP2-5 devices. Newer devices that have less wait-pins (such as AM335x) only support booting with device-tree and so hard-coding the wait-pin number when not using device-tree is fine. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Jon Hunter 提交于
The OMAP2+ code that configures the GPMC for ONENAND devices is copying structures between functions unnecessarily. Avoid this by passing pointers instead and simplify the code. A pointer to structure "omap_onenand_platform_data" is passed to the function omap2_onenand_calc_sync_timings(), but only the flags member of the structure is used. Simplify the code by only passing the flags member and not the entire structure. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
-
由 Ezequiel Garcia 提交于
This check is done before the call to gpmc_cs_reserved() and gpmc_cs_set_reserved() and it's redundant to do it again in each function. This simplifies the code a bit. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
Since the condition is not an error but a warning, replace printk KERN_ERR with dev_warn. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
Do this becasue dev_err() is preferred over pr_err() and because it will match gpmc-nand, thus the code shows looks more consistent. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
If CS request fails the current error message is rather unhelpful. Fix it by printing the failing chip select and the error code. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
If CS request fails the current error message is rather unhelpful. Fix it by printing the failing chip select and the error code. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
Currently gpmc_cs_reserved() return value is somewhat inconsistent, returning a negative value on an error condition, a positive value if the chip select is reserved and zero if it's available. Fix this by returning a boolean value as the function name suggests: * true if the chip select is reserved, * false if it's available Suggested-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
This function is not used anywhere, so it's safe to remove it. This means less code to maintain. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Ezequiel Garcia 提交于
This patch marks a bunch of functions that are local to gpmc.c file only as static. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
由 Mark Jackson 提交于
When setting the GPMC device type, make sure any previous bits are cleared down, before applying the new setting. For OMAP4+ devices MUXADDDATA is a 2-bit field (bits 9:8) where as for OMAP2/3 devices it was only a one bit field (bit 9). For OMAP2/3 devices bit 8 is reserved and the OMAP documentation says to write a 0 to this bit. So clearing bit 8 on OMAP2/3 devices should not be a problem. Hence update the code to handle both bits 8 and 9 for all devices. Signed-off-by: NMark Jackson <mpfj@newflow.co.uk> [jon-hunter@ti.com: updated changelog] Signed-off-by: NJon Hunter <jon-hunter@ti.com>
-
- 14 3月, 2013 1 次提交
-
-
由 Russell King 提交于
Consistently check errors using the usual method used in the kernel for much of its history. For instance: int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) { int div; div = gpmc_calc_divider(t->sync_clk); if (div < 0) return div; static int gpmc_set_async_mode(int cs, struct gpmc_timings *t) { ... return gpmc_cs_set_timings(cs, t); ..... ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t); if (IS_ERR_VALUE(ret)) return ret; So, gpmc_cs_set_timings() thinks any negative return value is an error, but where we check that in higher levels, only a limited range are errors... There is only _one_ use of IS_ERR_VALUE() in arch/arm which is really appropriate, and that is in arch/arm/include/asm/syscall.h: static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { unsigned long error = regs->ARM_r0; return IS_ERR_VALUE(error) ? error : 0; } because this function really does have to differentiate between error return values and addresses which look like negative numbers (eg, from mmap()). So, here's a patch to remove them from OMAP, except for the above. Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 05 3月, 2013 2 次提交
-
-
由 Jon Hunter 提交于
Commit 6797b4fe (ARM: OMAP2+: Prevent potential crash if GPMC probe fails) added code to ensure that GPMC chip-selects could not be requested until the device probe was successful. The chip-selects should have been unreserved at the end of the probe function, but the code to unreserve them appears to have ended up in the gpmc_calc_timings() function and hence, this is causing problems requesting chip-selects. Fix this merge error by unreserving the chip-selects at the end of the probe, but before we call the gpmc child probe functions (for device-tree) which request a chip-select. Signed-off-by: NJon Hunter <jon-hunter@ti.com> Tested-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: NPhilip Avinash <avinashphilip@ti.com> Tested-by: NGrazvydas Ignotas <notasas@gmail.com> [tony@atomide.com: updated description to add breaking commit id] Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Commit 16559ae4 (kgdb: remove #include <linux/serial_8250.h> from kgdb.h) had a side effect of breaking omap1_defconfig build as some headers were included indirectly: arch/arm/mach-omap1/board-h2.c:249: error: ‘INT_KEYBOARD’ undeclared here (not in a function) ... This worked earlier as linux/serial_8250.h included linux/serial_core.h, via linux/serial_8250.h from linux/kgdb.h. Fix this by including the necessary headers directly. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 03 3月, 2013 14 次提交
-
-
由 James Hogan 提交于
metag/allmodconfig: drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 'vb2_dc_get_base_sgt': drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function 'dma_get_sgtable' For architectures using dma_map_ops, dma_get_sgtable() is provided in <asm-generic/dma-mapping-common.h>. Metag does not use dma_map_ops yet, hence it should implement it as an inline stub using dma_common_get_sgtable(). Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
-
由 James Hogan 提交于
Metag doesn't have a metag_dt_memblock_reserve() function so remove the declaration from asm/prom.h. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
Make a copy of the device tree blob in non-init memory. It is required when using built-in device tree files that the platform code copies the blob to non-init memory prior to calling unflatten_device_tree(), otherwise the strings that the device tree refer to will get poisoned and potentially reused, breaking later reading of the device tree post-init (such as compatible matching in modules, debugfs, and the procfs interface). Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Reviewed-by: NVineet Gupta <vgupta@synopsys.com>
-
由 James Hogan 提交于
Minimise metag_ksyms.c includes to directly include the <asm/*.h> files that declare a particular symbol, and not include any unnecessary ones. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in mm/init.c into mm/init.c. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in usercopy.c into usercopy.c Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in setup.c into setup.c Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in kick.c into kick.c Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in traps.c into traps.c Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
The SMP version of arch_local_irq_enable() uses preempt_disable(), but <asm/irqflags.h> doesn't include <linux/preempt.h> causing the following errors on SMP when pstore/ftrace is enabled (caught by buildbot smp allyesconfig): In file included from include/linux/irqflags.h:15, from fs/pstore/ftrace.c:16: arch/metag/include/asm/irqflags.h: In function 'arch_local_irq_enable': arch/metag/include/asm/irqflags.h:84: error: implicit declaration of function 'preempt_disable' arch/metag/include/asm/irqflags.h:86: error: implicit declaration of function 'preempt_enable_no_resched' However <linux/preempt.h> cannot be easily included from <asm/irqflags.h> as it can cause circular include dependencies in the !SMP case, and potentially in the SMP case in the future. Therefore move the SMP implementation of arch_local_irq_enable() into traps.c and use an inline version of get_trigger_mask() which is also defined in traps.c for SMP. This adds an extra layer of function call / stack push when preempt_disable needs to call other functions, however in the non-preemptive SMP case it should be about as fast, as it was already calling the get_trigger_mask() function which is now used inline. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
Convert hugetlb_get_unmapped_area_new_pmd() to use vm_unmapped_area() rather than searching the virtual address space itself. This fixes the following errors in linux-next due to the specified members being removed after other architectures have already been converted: arch/metag/mm/hugetlbpage.c: In function 'hugetlb_get_unmapped_area_new_pmd': arch/metag/mm/hugetlbpage.c:199: error: 'struct mm_struct' has no member named 'cached_hole_size' arch/metag/mm/hugetlbpage.c:200: error: 'struct mm_struct' has no member named 'free_area_cache' arch/metag/mm/hugetlbpage.c:215: error: 'struct mm_struct' has no member named 'cached_hole_size' Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Acked-by: NMichel Lespinasse <walken@google.com>
-
由 James Hogan 提交于
Various file systems use clear_page() and copy_page(), so when they're built as modules we get build errors like the following: ERROR: "clear_page" [fs/ntfs/ntfs.ko] undefined! ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined! Therefore export these functions to modules from metag_ksyms.c to fix the errors. This was hit by a randconfig build. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
Various file systems indirectly use metag_code_cache_flush_all(), so when they're built as modules we get build errors like the following: ERROR: "metag_code_cache_flush_all" [fs/xfs/xfs.ko] undefined! Therefore export this function to modules to fix the errors. This was hit by a randconfig build. Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-
由 James Hogan 提交于
Rename setup_txprivext() to setup_priv() and add initialisation of some more per-thread privilege protection registers: - TxPRIVSYSR: 0x04400000-0x047fffff 0x05000000-0x07ffffff 0x84000000-0x87ffffff - TxPIOREG: 0x02000000-0x02ffffff 0x04800000-0x048fffff - TxSYREG: 0x04000000-0x04000fff (except write fetch system event) Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
-