- 14 May, 2009 2 commits
-
-
Chaithrika U S authored
Assign the platform resource structures according to the EVMs used. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Kevin Hilman authored
This patch seems to get me much more reliable performance using the GPIO banked interrupts on dm355 for the dm9000 driver. Changes include: - init GPIO handling along with normal GPIO init - mask the level-sensitive bank IRQ during handling Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
- 07 May, 2009 5 commits
-
-
David Brownell authored
Fix two IRQ triggering bugs affecting GPIO IRQs: - Make sure enabling with IRQ_TYPE_NONE ("default, unspecified") isn't a NOP ... default to both edges, at least one must work. - As noted by Kevin Hilman, setting the irq trigger type for a banked gpio interrupt shouldn't enable irqs that are disabled. Since GPIO IRQs haven't been used much yet, it's not clear these bugs could have affected anything. The few current users don't seem to have been obviously suffering from these issues. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
David Brownell authored
Provide a generic SRAM allocator using genalloc, and vaguely modeled after what AVR32 uses. This builds on top of the static CPU mapping set up in the previous patch, and returns DMA mappings as requested (if possible). Compared to its OMAP cousin, there's no current support for (currently non-existent) DaVinci power management code running in SRAM; and this has ways to deallocate, instead of being allocate-only. The initial user of this should probably be the audio code, because EDMA from DDR is subject to various dropouts on at least DM355 and DM6446 chips. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
David Brownell authored
Package on-chip SRAM. It's always accessible from the ARM, so set up a standardized virtual address mapping into a 128 KiB area that's reserved for platform use. In some cases (dm6467) the physical addresses used for EDMA are not the same as the ones used by the ARM ... so record that info separately in the SOC data, for chips (unlike the OMAP-L137) where SRAM may be used with EDMA. Other blocks of SRAM, such as the ETB buffer or DSP L1/L2 RAM, may be unused/available on some system. They are ignored here. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
David Brownell authored
Remove dm6446-specific SRAM allocator, as preparation for a more generic replacement. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Kevin Hilman authored
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
- 30 Apr, 2009 4 commits
-
-
Kevin Hilman authored
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Kevin Hilman authored
As per commit 284901a9, use DMA_BIT_MASK(n) Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The offset for the compare register used by the davinci time code are passed in via the cmp_off member of the 'davinci_timer_instance' structure. Therefore, the offset defined in time.c are not necessary. Signed-off-by: Mark A. Greer <mgreer@mvista.com>
-
eric miao authored
It seems that declarations of kmalloc/kfree are missed, explicitly include it. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-
- 29 Apr, 2009 1 commit
-
-
David Brownell authored
Fix the following bug, which was reported after a command line "reboot": WARNING: at kernel/lockdep.c:2280 lockdep_trace_alloc+0x40/0x50() Modules linked in: [<c002d910>] (unwind_backtrace+0x0/0xdc) from [<c003bba8>] (warn_slowpath+0x68/0x8c) [<c003bba8>] (warn_slowpath+0x68/0x8c) from [<c005ecf0>] (lockdep_trace_alloc+0x40/0x50) [<c005ecf0>] (lockdep_trace_alloc+0x40/0x50) from [<c0091e14>] (__kmalloc+0x58/0x110) [<c0091e14>] (__kmalloc+0x58/0x110) from [<c0165044>] (kvasprintf+0x38/0x58) [<c0165044>] (kvasprintf+0x38/0x58) from [<c015e794>] (kobject_set_name_vargs+0x14/0x54) [<c015e794>] (kobject_set_name_vargs+0x14/0x54) from [<c019b9ac>] (dev_set_name+0x20/0x2c) [<c019b9ac>] (dev_set_name+0x20/0x2c) from [<c0031804>] (davinci_watchdog_reset+0x1c/0xb0) [<c0031804>] (davinci_watchdog_reset+0x1c/0xb0) from [<c0029304>] (arm_machine_restart+0x24/0x50) [<c0029304>] (arm_machine_restart+0x24/0x50) from [<c0028d84>] (machine_restart+0x18/0x20) [<c0028d84>] (machine_restart+0x18/0x20) from [<c004ba80>] (sys_reboot+0xe0/0x1c4) [<c004ba80>] (sys_reboot+0xe0/0x1c4) from [<c0027d40>] (ret_fast_syscall+0x0/0x2c) The issue is that dev_set_name() may no longer be called with IRQs disabled. Trivial fix: don't cons up a fake watchdog device, just use the real one. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
- 17 Apr, 2009 4 commits
-
-
Chaithrika U S authored
Use network device ops interface. Tested on TI DM646x adn DM644x EVMs. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Chaithrika U S authored
Fix for phy_disconnect bug Disconnect the phy device only if there is a PHY connected. If the phy_mask is zero, the phydev pointer is null, therefore check the phydevice before disconnection. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Different SoC have different numbers of pinmux registers and other resources that overlap with each other. To clean up the code and eliminate defines that overlap with each other, move the PINMUX defines to the SoC specific files. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The Timer64p timer has 8 compare registers that can be used to generate interrupts when the timer value matches the compare reg's value. They do not disturb the timer itself. This can be useful when there is only one timer available for both clock events and clocksource. When enabled, the clocksource remains a continuous 32-bit counter but the clock event will no longer support periodic interrupts. Instead only oneshot timers will be supported and implemented by setting the compare register to the current timer value plus the period that the clock event subsystem is requesting. Compare registers support is enabled automatically when the following conditions are met: 1) The same timer is being used for clock events and clocksource. 2) The timer is the bottom half (32 bits) of the 64-bit timer (hardware limitation). 3) The the compare register offset and irq are not zero. Since the timer is always running, there is a hardware race in timer32_config() between reading the current timer value, and adding the period to the current timer value and writing the compare register. Testing on a da830 evm board with the timer clocked at 24 MHz and the processor clocked at 300 MHz, showed the number of counter ticks to do this ranged from 20-53 (~1-2.2 usecs) but usually around 41 ticks. This includes some artifacts from collecting the information. So, the minimum period should be at least 5 usecs to be safe. There is also an non-critical lower limit that the period should be since there is no point in setting an event that is much shorter than the time it takes to set the event, and get & handle the timer interrupt for that event. There can also be all sorts of delays from activities occuring elsewhere in the system (including hardware activitis like cache & TLB management). These are virtually impossible to quantify so a minimum period of 50 usecs was chosen. That will certianly be enough to avoid the actual hardware race but hopefully not large enough to cause unreasonably course-grained timers. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
- 16 Apr, 2009 18 commits
-
-
Mark A. Greer authored
Integrate the Common Platform Interrupt Controller (cp_intc) support into the low-level irq handling for davinci and similar platforms. Do it such that support for cp_intc and the original aintc can coexist in the same kernel binary. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Factor out the code to extract that mac address from i2c eeprom. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The dm644x and dm646x board files have i2c eeprom read and write routines but they are not used so remove them. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Since most of the emac platform_data is really SoC specific and not board specific, move it to the SoC-specific files. Put a pointer to the platform_data in the soc_info structure so the board-specific code can set some of the platform_data if it needs to. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Currently, there is one set of platform_device and platform_data structures for all DaVinci SoCs. The differences in the data between the various SoCs is handled by davinci_serial_init() by checking the SoC type. However, as new SoCs appear, this routine will become more & more cluttered. To clean up the routine and make it easier to add support for new SoCs, move the platform_device and platform_data structures into the SoC-specific code and use the SoC infrastructure to provide access to the data. In the process, fix a bug where the wrong irq is used for uart2 of the dm646x. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The current gpio code needs to know the number of gpio irqs there are and what the bank irq number is. To determine those values, it checks the SoC type. It also assumes that the base address and the number of irqs the interrupt controller uses is fixed. To clean up the SoC checks and make it support different base addresses and interrupt controllers, have the SoC-specific code set those values in the soc_info structure and have the gpio code reference them there. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The watchdog code currently hardcodes the base address of the timer its using. To support new SoCs, make it support timers at any address. Use the soc_info structure to do this. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The davinci timer code currently hardcodes the timer register base addresses, the timer irq numbers, and the timers to use for clock events and clocksource. This won't work for some a new SoC so put those values into the soc_info structure and set them up in the SoC-specific files. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Use the SoC infrastructure to hold the interrupt controller information (i.e., base address, default priorities, interrupt controller type, and the number of IRQs). The interrupt controller base, although initially put in the soc_info structure's intc_base field, is eventually put in the global 'davinci_intc_base' so the low-level interrupt code can access it without a dereference. These changes enable the SoC default irq priorities to be put in the SoC-specific files, and the interrupt controller to be at any base address. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The pinmux register base and setup can be different for different SoCs so move the pinmux reg base, pinmux table (and its size) to the SoC infrastructure. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The current code to support the DaVinci Power and Sleep Controller (PSC) assumes that there is only one controller. This assumption is no longer valid so expand the support to allow greater than one PSC. To accomplish this, put the base addresses for the PSCs in the SoC infrastructure so it can be referenced by the PSC code. This also requires adding an extra parameter to davinci_psc_config() to specify the PSC that is to be enabled/disabled. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
All of the davinci SoCs need to call davinci_clk_init() so put the call in the common init routine. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
The Davinci cpu_is_davinci_*() macros use the SoC part number and variant retrieved from the JTAG ID register to determine the type of cpu that the kernel is running on. Currently, the code to read the JTAG ID register assumes that the register is always at the same base address. This isn't true on some newer SoCs. To solve this, have the SoC-specific code set the JTAG ID register base address in soc_info structure and add a 'cpu_id' member to it. 'cpu_id' will be used by the cpu_is_davinci_*() macros to match the cpu id. Also move the info used to identify the cpu type into the SoC-specific code to keep all SoC-specific code together. The common code will read the JTAG ID register, search through an array of davinci_id structures to identify the cpu type. Once identified, it will set the 'cpu_id' member of the soc_info structure to the proper value and the cpu_is_davinci_*() macros will now work. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Mark A. Greer authored
Create a structure to encapsulate SoC-specific information. This will assist in generalizing code so it can be used by different SoCs that have similar hardware but with minor differences such as having a different base address. The idea is that the code for each SoC fills out a structure with the correct information. The board-specific code then calls the SoC init routine which in turn will call a common init routine that makes a copy of the structure, maps in I/O regions, etc. After initialization, code can get a pointer to the structure by calling davinci_get_soc_info(). Eventually, the common init routine will make a copy of all of the data pointed to by the structure so the original data can be made __init_data. That way the data for SoC's that aren't being used won't consume memory for the entire life of the kernel. The structure will be extended in subsequent patches but initially, it holds the map_desc structure for any I/O regions the SoC/board wants statically mapped. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Chaithrika U S authored
Fix EMAC driver build errors for 2.6.30-rc2 staging branch The member 'bus_id' no longer exists in the device structure, instead use dev_name() function. Also, replace netif_rx_schedule() and netif_rx_complete() with napi_schedule() and napi_complete() respectively. Tested on TI DM644x and DM646x EVMs. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Kevin Hilman authored
Conflicts: arch/arm/mach-davinci/board-evm.c arch/arm/mach-davinci/include/mach/nand.h drivers/ide/palm_bk3710.c drivers/media/video/Makefile drivers/misc/eeprom/at24.c drivers/misc/eeprom/at25.c drivers/mmc/host/Kconfig drivers/mmc/host/Makefile drivers/mtd/nand/Kconfig drivers/mtd/nand/Makefile drivers/mtd/nand/davinci_nand.c drivers/usb/musb/davinci.c drivers/video/Makefile drivers/watchdog/davinci_wdt.c include/linux/memory.h sound/soc/davinci/davinci-evm.c sound/soc/davinci/davinci-sffsdr.c
-
Troy Kisky authored
Move the creation of a random ethernet address from devices.c into davinci_emac.c. This allows me to delete the davinci_emac_init function and directly call the dmxxx specific function from the board file. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
-
Kevin Hilman authored
This reverts commit 1420b5d7.
-
- 15 Apr, 2009 5 commits
-
-
Troy Kisky authored
Use the same mac order in emac_set_type0addr as in emac_set_type1addr. The byte order was reversed. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Stijn Devriendt authored
Signed-off-by: Stijn Devriendt <HIGHGuY@gmail.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Vipin Bhandari authored
The scatterlist traversal is made proper. The patch has some minor comments modification and also sets the value written to the DAVINCI_MMCTOR register properly. The timeout calculation is made proper by deriving it from the clock values. This patch incorporates most of review comments given on LKLM by Pierre Ossman. Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
Naresh Medisetty authored
Currently the auto generated file mach-types.h is checking for MACH_DAVINCI_DM6467_EVM, while it is configured as MACH_DAVINCI_DM646X_EVM in the Kconfigs and defconfigs. So machine_is_davinci_dm6467_evm() always returns FALSE. Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
David Brownell authored
Update NAND partitioning for the dm6446 evm, unmasking the hidden data at the beginning and letting the kernel be updated from Linux. - This is boot-compatible with TI's software (U-Boot 1.20 and both the 2.6.10 and 2.6.18 kernels), in terms of startup and loading kernels from flash. - In the same way, it's also boot-compatible with mainline U-Boot, which stores U-Boot params in block 0 not block 16. - It's not quite compatible with systems that previously used NAND partitions to hold (filesystem) data. The compatibilities are a bit different based on which kernel was used previously + Users of TI/MV kernels no longer see mtd2 "params" (mainline u-boot env is in a different place) * Filesystem is now mtd2 ... vs mtd3 + Users of GIT kernels now see mtd0 and mtd1 partitions * Filesystem partition starts 640 KBytes earlier * Filesystem is now mtd2 ... vs mtd0 * Linux now *uses* the flash-resident BBT * Removes annoying slowdown/hiccup during boot * Potentially ~64KB less space available with TI/MV kernels If you *used* NAND partitions from Linux, there is no solution that's fully compatible with all previous kernels in those respects ... ergo this "best compromise". It'd be good to back back up the filesystem data; or, carry your own backwards-compatibility patch for awhile. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-
- 14 Apr, 2009 1 commit
-
-
Linus Torvalds authored
-