- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch (Revision 2781)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch (Revision 2782)
- @@ -194,7 +194,7 @@
- +#define LCDC_LSCR 0x00120300
- +#define LCDC_LRMCR 0x00000000
- +#define LCDC_LDCR 0x00020010
- -+#define LCDC_LPCCR 0x00a9037f
- ++#define LCDC_LPCCR 0x00a903ff
- +#define LCDC_LPCR 0xFA008B80
- +#define LCDC_LPCR_PCD 0x4
- +
- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch.md5
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch.md5 (Revision 0)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch.md5 (Revision 2782)
- @@ -0,0 +1 @@
- +2baf10b6bf67f4c0f2d3cca766b2e8e8 ./freescale/pkgs/kernel-2.6.31-1327402865.patch
- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch (Revision 0)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch (Revision 2782)
- @@ -0,0 +1,57 @@
- +diff --exclude CVS --exclude .git -uNr u-boot-2009.08/board/freescale/quantron_a/quantron_a.c u-boot-2009.08.modified/board/freescale/quantron_a/quantron_a.c
- +--- u-boot-2009.08/board/freescale/quantron_a/quantron_a.c 2012-02-28 14:34:25.000000000 +0100
- ++++ u-boot-2009.08.modified/board/freescale/quantron_a/quantron_a.c 2012-02-28 14:26:18.000000000 +0100
- +@@ -168,6 +168,45 @@
- + int board_init(void)
- + {
- + setup_soc_rev();
- ++
- ++ mxc_iomux_set_pad(MX25_PIN_PWM, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++
- ++
- ++ mxc_iomux_set_pad(MX25_PIN_PWM, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++
- ++ mxc_request_iomux(MX25_PIN_CSI_HSYNC, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_CSI_HSYNC, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_dataout(MX25_PIN_CSI_HSYNC, 0);
- ++
- ++ mxc_request_iomux(MX25_PIN_CSPI1_RDY, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_CSPI1_RDY, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_dataout(MX25_PIN_CSPI1_RDY, 0);
- ++
- ++ mxc_request_iomux(MX25_PIN_UART2_CTS, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_UART2_CTS, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_direction(MX25_PIN_UART2_CTS, 0); /* Als Ausgang definieren */
- ++ mxc_set_gpio_dataout(MX25_PIN_UART2_CTS, 0);
- ++
- ++ mxc_request_iomux(MX25_PIN_CSI_MCLK, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_CSI_MCLK, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_dataout(MX25_PIN_CSI_MCLK, 0);
- ++
- ++ mxc_request_iomux(MX25_PIN_CSI_VSYNC, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_CSI_VSYNC, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_dataout(MX25_PIN_CSI_VSYNC, 0);
- ++
- ++ mxc_request_iomux(MX25_PIN_CSI_D8, MUX_CONFIG_ALT5);
- ++ mxc_iomux_set_pad(MX25_PIN_CSI_D8, PAD_CTL_PKE_ENABLE |
- ++ PAD_CTL_PUE_PUD | PAD_CTL_100K_PD);
- ++ mxc_set_gpio_dataout(MX25_PIN_CSI_D8, 0);
- ++
- + /* setup pins for UART5 */
- + /* UART 5 IOMUX Configs */
- + mxc_request_iomux(MX25_PIN_PWM, MUX_CONFIG_FUNC);
- +@@ -187,6 +226,7 @@
- + INPUT_CTL_PATH1);
- +
- +
- ++
- + /* setup pins for FEC */
- + mxc_request_iomux(MX25_PIN_FEC_TX_CLK, MUX_CONFIG_FUNC);
- + mxc_request_iomux(MX25_PIN_FEC_RX_DV, MUX_CONFIG_FUNC);
- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch.md5
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch.md5 (Revision 2781)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1283853740.patch.md5 (Revision 2782)
- @@ -1 +1 @@
- -24cb90163505e390889987c5f9a6d203 u-boot-2009.08-1283853740.patch
- +419a5f9f6301998ff199bf8c44f8aceb ./freescale/pkgs/u-boot-2009.08-1283853740.patch
- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch.md5
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch.md5 (Revision 0)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/u-boot-2009.08-1330436059.patch.md5 (Revision 2782)
- @@ -0,0 +1 @@
- +1b853c6f4860feecbf74398cf024163e ./freescale/pkgs/u-boot-2009.08-1330436059.patch
- Index: /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch
- ===================================================================
- --- /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch (Revision 0)
- +++ /home/rmainz/tmp/svneckelmanngroup_search/max/quantron_a/trunk/src/ltib_custom/pkgs/kernel-2.6.31-1327402865.patch (Revision 2782)
- @@ -0,0 +1,511 @@
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/mach-mx25/mx25_qa.c linux-2.6.31.modified/arch/arm/mach-mx25/mx25_qa.c
- +--- linux-2.6.31/arch/arm/mach-mx25/mx25_qa.c 2012-02-27 12:12:26.000000000 +0100
- ++++ linux-2.6.31.modified/arch/arm/mach-mx25/mx25_qa.c 2012-02-27 11:53:00.000000000 +0100
- +@@ -346,10 +346,14 @@
- +
- + static void __init mx25_qa_timer_init(void)
- + {
- ++ /* Clock source fuer den gpt ist ahb_div */
- ++ __raw_writel(__raw_readl(MXC_CCM_BASE+0x64) & ~(1 << 5),
- ++ MXC_CCM_BASE + 0x64);
- ++
- + mx25_clocks_init(24000000);
- + }
- +
- +-static struct sys_timer mxc_timer = {
- ++static struct sys_timer mxc_timer = {
- + .init = mx25_qa_timer_init,
- + };
- +
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/drivers/mxc/adc/imx_adc.c linux-2.6.31.modified/drivers/mxc/adc/imx_adc.c
- +--- linux-2.6.31/drivers/mxc/adc/imx_adc.c 2012-01-24 12:01:56.000000000 +0100
- ++++ linux-2.6.31.modified/drivers/mxc/adc/imx_adc.c 2012-01-24 11:55:41.000000000 +0100
- +@@ -48,6 +48,17 @@
- + static int suspend_flag;
- +
- + /*!
- ++ * To indicate that the touchscreen was touched at least one time
- ++ */
- ++static bool touched = false;
- ++
- ++/*!
- ++ * The time in ms to wait between reading the ADCStatus Flag
- ++ * while the screen wasn't touched since last boot up
- ++ */
- ++#define ADC_STATUS_READING_GAP 300
- ++
- ++/*!
- + * The suspendq is used by blocking application calls
- + */
- + static wait_queue_head_t suspendq;
- +@@ -285,8 +296,17 @@
- + __raw_writel(reg, tsc_base + TCQMR);
- +
- + wait_event_interruptible(tsq, ts_data_ready);
- +- while (!(__raw_readl(tsc_base + TCQSR) & CQSR_EOQ))
- ++
- ++ while (!(__raw_readl(tsc_base + TCQSR) & CQSR_EOQ)){
- ++
- ++ // When the screen was not touched since bootup, wait a bit
- ++ // otherwise this "while" would run full powered until the
- ++ // screen is touched.
- ++ if (!touched) {
- ++ msleep(ADC_STATUS_READING_GAP);
- ++ }
- + continue;
- ++ }
- + /* stop the conversion */
- + reg = __raw_readl(tsc_base + TCQCR);
- + reg &= ~CQCR_QSM_MASK;
- +@@ -370,6 +390,10 @@
- +
- + if (tsi_data == FQS_DATA)
- + up(&ts_convert_mutex);
- ++
- ++ /* Now we know that the touchscreen was touched at least one time */
- ++ touched = true;
- ++
- + return IMX_ADC_SUCCESS;
- + }
- +
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/drivers/video/mxc/mx2fb.c linux-2.6.31.modified/drivers/video/mxc/mx2fb.c
- +--- linux-2.6.31/drivers/video/mxc/mx2fb.c 2012-01-24 12:01:57.000000000 +0100
- ++++ linux-2.6.31.modified/drivers/video/mxc/mx2fb.c 2012-01-24 11:23:35.000000000 +0100
- +@@ -1086,7 +1086,7 @@
- + void mx2fb_set_brightness(uint8_t level)
- + {
- + /* Set LCDC PWM contract control register */
- +- __raw_writel(0x00A90300 | level, LCDC_REG(LCDC_LPCCR));
- ++ __raw_writel(0, LCDC_REG(LCDC_LPCCR));
- + }
- +
- + EXPORT_SYMBOL(mx2fb_set_brightness);
- +
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/mach-mx25/clock.c linux-2.6.31.modified/arch/arm/mach-mx25/clock.c
- +--- linux-2.6.31/arch/arm/mach-mx25/clock.c 2011-04-12 11:03:01.000000000 +0200
- ++++ linux-2.6.31.modified/arch/arm/mach-mx25/clock.c 2011-04-05 11:48:32.000000000 +0200
- +@@ -1746,6 +1746,6 @@
- + clk_enable(&gpt3_clk[1]);
- + clk_enable(&gpt4_clk[1]);
- +
- +- mxc_timer_init(&gpt1_clk[0], IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT1);
- ++ mxc_timer_init(&gpt1_clk[0], IO_ADDRESS(GPT3_BASE_ADDR), MXC_INT_GPT3);
- + return 0;
- + }
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/mach-mx25/devices.c linux-2.6.31.modified/arch/arm/mach-mx25/devices.c
- +--- linux-2.6.31/arch/arm/mach-mx25/devices.c 2011-04-12 11:03:02.000000000 +0200
- ++++ linux-2.6.31.modified/arch/arm/mach-mx25/devices.c 2011-04-05 11:27:36.000000000 +0200
- +@@ -560,15 +560,21 @@
- + .flags = IORESOURCE_MEM,
- + },
- +
- +- [2] = {
- +- .start = GPT3_BASE_ADDR,
- +- .end = GPT3_BASE_ADDR + SZ_4K - 1,
- +- .flags = IORESOURCE_MEM,
- ++ [2] = {
- ++ .start = GPT1_BASE_ADDR,
- ++ .end = GPT1_BASE_ADDR + SZ_4K - 1,
- ++ .flags = IORESOURCE_MEM,
- + },
- +
- + [3] = {
- ++ .start = GPT2_BASE_ADDR,
- ++ .end = GPT2_BASE_ADDR + SZ_4K - 1,
- ++ .flags = IORESOURCE_MEM,
- ++ },
- ++
- ++ [4] = {
- + .start = GPT4_BASE_ADDR,
- +- .end = GPT4_BASE_ADDR + SZ_4K - 1,
- ++ .end = GPT4_BASE_ADDR + SZ_4K - 1,
- + .flags = IORESOURCE_MEM,
- + },
- +
- +
- +
- +
- +
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/mach-mx25/mx25_qa_gpio.c linux-2.6.31.modified/arch/arm/mach-mx25/mx25_qa_gpio.c
- +--- linux-2.6.31/arch/arm/mach-mx25/mx25_qa_gpio.c 2011-04-12 11:03:02.000000000 +0200
- ++++ linux-2.6.31.modified/arch/arm/mach-mx25/mx25_qa_gpio.c 2011-04-05 09:18:26.000000000 +0200
- +@@ -358,40 +358,41 @@
- + }
- + EXPORT_SYMBOL(gpio_pwm_inactive);
- +
- +-void gpio_cc_active(int cc_nr){
- ++void gpio_cc_active(void){
- + /*
- + * Configure the IOMUX control registers for the compare capture signals
- + */
- +- switch ( cc_nr ) {
- +- case 0:
- +- /* CC3 IOMUX Configs */
- +- mxc_request_iomux(MX25_PIN_UART1_RTS, MUX_CONFIG_ALT2);
- +- mxc_iomux_set_pad(MX25_PIN_UART1_RTS, PAD_CTL_47K_PU);
- +- break;
- +- case 1:
- +- /* CC4 IOMUX Configs */
- +- mxc_request_iomux(MX25_PIN_CONTRAST, MUX_CONFIG_ALT1);
- +- mxc_iomux_set_pad(MX25_PIN_CONTRAST, PAD_CTL_47K_PU);
- +- break;
- +- default:
- +- break;
- +- }
- ++ /* CC3 IOMUX Configs */
- ++ mxc_request_iomux(MX25_PIN_UART1_RTS, MUX_CONFIG_ALT2);
- ++ mxc_iomux_set_pad(MX25_PIN_UART1_RTS, PAD_CTL_47K_PU);
- ++
- ++ mxc_request_iomux(MX25_PIN_CONTRAST, MUX_CONFIG_ALT1);
- ++ mxc_iomux_set_pad(MX25_PIN_CONTRAST, PAD_CTL_47K_PU);
- ++
- ++ mxc_request_iomux(MX25_PIN_GPIO_C, MUX_CONFIG_ALT4);
- ++ mxc_iomux_set_pad(MX25_PIN_GPIO_C, PAD_CTL_47K_PU);
- ++
- ++ mxc_request_iomux(MX25_PIN_UART2_RTS, MUX_CONFIG_ALT3);
- ++ mxc_iomux_set_pad(MX25_PIN_UART2_RTS, PAD_CTL_47K_PU);
- ++
- + }
- + EXPORT_SYMBOL(gpio_cc_active);
- +
- +-void gpio_cc_inactive(int cc_nr){
- +- switch ( cc_nr ) {
- +- case 0:
- +- gpio_request(IOMUX_TO_GPIO(MX25_PIN_UART1_RTS), NULL);
- +- mxc_free_iomux(MX25_PIN_UART1_RTS, MUX_CONFIG_GPIO);
- +- break;
- +- case 1:
- +- mxc_free_iomux(MX25_PIN_CONTRAST, MUX_CONFIG_FUNC);
- +- break;
- +
- +- default:
- +- break;
- +- }
- ++void gpio_cc_inactive(void){
- ++
- ++ gpio_request(IOMUX_TO_GPIO(MX25_PIN_UART1_RTS), NULL);
- ++ mxc_free_iomux(MX25_PIN_UART1_RTS, MUX_CONFIG_GPIO);
- ++
- ++ mxc_free_iomux(MX25_PIN_CONTRAST, MUX_CONFIG_FUNC);
- ++
- ++ gpio_request(IOMUX_TO_GPIO(MX25_PIN_GPIO_C), NULL);
- ++ mxc_free_iomux(MX25_PIN_GPIO_C, MUX_CONFIG_GPIO);
- ++
- ++ gpio_request(IOMUX_TO_GPIO(MX25_PIN_UART2_RTS), NULL);
- ++ mxc_free_iomux(MX25_PIN_UART2_RTS, MUX_CONFIG_GPIO);
- ++
- ++
- + }
- + EXPORT_SYMBOL(gpio_cc_inactive);
- +
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/plat-mxc/include/mach/mxc_timer.h linux-2.6.31.modified/arch/arm/plat-mxc/include/mach/mxc_timer.h
- +--- linux-2.6.31/arch/arm/plat-mxc/include/mach/mxc_timer.h 2011-04-12 11:02:52.000000000 +0200
- ++++ linux-2.6.31.modified/arch/arm/plat-mxc/include/mach/mxc_timer.h 2011-04-05 11:39:36.000000000 +0200
- +@@ -67,8 +67,8 @@
- + }
- +
- + #elif defined(CONFIG_ARCH_MX2)
- +-#define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
- +-#define TIMER_INTERRUPT MXC_INT_GPT1
- ++#define TIMER_BASE IO_ADDRESS(GPT3_BASE_ADDR)
- ++#define TIMER_INTERRUPT MXC_INT_GPT3
- +
- + #define MXC_TCTL 0x00
- + #define TCTL_VAL TCTL_CLK_PCLK1
- +diff --exclude CVS --exclude .git -uNr linux-2.6.31/arch/arm/plat-mxc/time.c linux-2.6.31.modified/arch/arm/plat-mxc/time.c
- +--- linux-2.6.31/arch/arm/plat-mxc/time.c 2011-04-12 11:02:52.000000000 +0200
- ++++ linux-2.6.31.modified/arch/arm/plat-mxc/time.c 2011-04-05 11:37:00.000000000 +0200
- +@@ -59,6 +59,83 @@
- + #define MX3_TCMP 0x10
- +
- + #define timer_is_v2() (!(cpu_is_mx1() || cpu_is_mx2()) || cpu_is_mx25())
- ++/* Anzahl der CC-Kanaele */
- ++#define SPEED_CHANNELS ((uchar) 2 )
- ++
- ++
- ++#define SPEED_DEF_PRESC ((ushort) 664 )
- ++
- ++/* CC vituelle Adressen Register */
- ++#define GPTCR(x) (((ulong *) x)+0 )
- ++#define GPTPR(x) (((ulong *) x)+1 )
- ++#define GPTSR(x) (((ulong *) x)+2 )
- ++#define GPTIR(x) (((ulong *) x)+3 )
- ++#define GPTICR1(x) (((ulong *) x)+7 )
- ++#define GPTICR2(x) (((ulong *) x)+8 )
- ++#define GPTCNT(x) (((ulong *) x)+9 )
- ++
- ++
- ++/// PWM Bits
- ++#define GPT_IM2(x) ((ulong) ((uchar)x<<18))
- ++#define GPT_IM1(x) ((ulong) ((uchar)x<<16))
- ++#define GPT_SWR ((ulong) 1<<15)
- ++#define GPT_FRR ((ulong) 1<<9)
- ++#define GPT_CLKSRC(x) ((ulong) ((uchar)x<<6))
- ++#define GPT_STOPEN ((ulong) 1<<5)
- ++#define GPT_WAITEN ((ulong) 1<<3)
- ++#define GPT_ENMOD ((ulong) 1<<1)
- ++#define GPT_EN ((ulong) 1<<0)
- ++
- ++#define GPT_ROVIE ((ulong) 1<<5)
- ++#define GPT_IF2IE ((ulong) 1<<4)
- ++#define GPT_IF1IE ((ulong) 1<<3)
- ++
- ++#define GPT_ROV ((ulong) 1<<5)
- ++#define GPT_IF2 ((ulong) 1<<4)
- ++#define GPT_IF1 ((ulong) 1<<3)
- ++#define GPT_OF1 ((ulong) 1<<0)
- ++
- ++#define GPT_CLKSRC_OFF ((ulong) 0<<6)
- ++#define GPT_CLKSRC_IPG ((ulong) 1<<6)
- ++#define GPT_CLKSRC_IPG_HF ((ulong) 2<<6)
- ++#define GPT_CLKSRC_IND_CLKIN ((ulong) 3<<6)
- ++#define GPT_CLKSRC_IPG_32K ((ulong) 4<<6)
- ++
- ++#define SPEED_NO_EVENT 0
- ++
- ++
- ++#define SPEED 0
- ++
- ++
- ++#define SPEED_HIGH_EDGE 0
- ++#define SPEED_LOW_EDGE 1
- ++
- ++/*******************************************************************************
- ++@Typdefinitionen (modullokal)
- ++*******************************************************************************/
- ++
- ++/*******************************************************************************
- ++@Variablen (modullokal)
- ++*******************************************************************************/
- ++
- ++
- ++/* Virtuelle Adresse fuer die PWM Resourcen */
- ++volatile static ulong *paulSPEED_virtualbase;
- ++
- ++/* Capture Values 1 */
- ++volatile static u32 aulSPEED_Val;
- ++
- ++/* Capture Values Channel 1 */
- ++volatile static u32 aulSPEED_Val1[2];
- ++
- ++/* old Capture Values */
- ++volatile static u32 aulSPEED_Val_Old;
- ++
- ++/* Capture Status */
- ++volatile static u8 aucSPEED_Stat;
- ++
- ++/* Toggle Bit */
- ++volatile static u8 aucSPEED_Toggle;
- +
- + static struct clock_event_device clockevent_mxc;
- + static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
- +@@ -79,8 +156,10 @@
- +
- + static inline void gpt_irq_enable(void)
- + {
- +- if (timer_is_v2())
- +- __raw_writel(1<<0, timer_base + MX3_IR);
- ++ if (timer_is_v2()) {
- ++ __raw_writel(0x09, timer_base + MX3_IR);
- ++ printk("mxc_set_mo\n\n\n\n\n\n");
- ++ }
- + else {
- + __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN,
- + timer_base + MXC_TCTL);
- +@@ -94,7 +173,7 @@
- + if (cpu_is_mx2())
- + __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, timer_base + MX1_2_TSTAT);
- + if (timer_is_v2())
- +- __raw_writel(MX3_TSTAT_OF1, timer_base + MX3_TSTAT);
- ++ __raw_writel(0x09, timer_base + MX3_TSTAT);
- + }
- +
- + static cycle_t mx1_2_get_cycles(struct clocksource *cs)
- +@@ -234,20 +313,157 @@
- + static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id)
- + {
- + struct clock_event_device *evt = &clockevent_mxc;
- +- uint32_t tstat;
- ++ ulong ulCap_Val=0;
- ++ ulong ulStatus;
- +
- +- if (timer_is_v2())
- +- tstat = __raw_readl(timer_base + MX3_TSTAT);
- +- else
- +- tstat = __raw_readl(timer_base + MX1_2_TSTAT);
- ++ ulStatus = __raw_readl(timer_base + MX3_TSTAT);
- ++ gpt_irq_acknowledge();
- ++
- ++
- ++ if(ulStatus & GPT_IF1){
- ++ ulCap_Val = __raw_readl(timer_base + 0x1C);
- ++
- ++
- ++ /* Wenn ein Timerueberlauf stattgefunden hat */
- ++ if( (ulStatus & GPT_IF1) && (ulCap_Val < aulSPEED_Val_Old) ){
- ++
- ++ /* Capture-Werte < 10 werden nicht beruecksichtigt */
- ++ if( ( (0xFFFFFFFF - aulSPEED_Val_Old) + ulCap_Val) > 10){
- ++ /* abwechselnd Werte fuer High und Lowedge schreiben */
- ++ aucSPEED_Toggle = (aucSPEED_Toggle+1)&0x01;
- ++ aulSPEED_Val1[aucSPEED_Toggle] = (0xFFFFFFFF - aulSPEED_Val_Old) + ulCap_Val;
- ++
- ++ /* den alten Capturewert behalten*/
- ++ aulSPEED_Val_Old = ulCap_Val;
- ++ }
- ++
- ++ }
- ++
- ++ /* Wenn kein Timerueberlauf stattgefunden hat */
- ++ if( (ulStatus & GPT_IF1) &&(ulCap_Val > aulSPEED_Val_Old) ){
- ++
- ++ /* Capture-Werte < 10 werden nicht beruecksichtigt */
- ++ if( (ulCap_Val - aulSPEED_Val_Old) > 10){
- +
- +- gpt_irq_acknowledge();
- ++ /* abwechselnd Werte fuer High und Lowedge schreiben */
- ++ aucSPEED_Toggle = (aucSPEED_Toggle+1)&0x01;
- ++ aulSPEED_Val1[aucSPEED_Toggle] = ulCap_Val - aulSPEED_Val_Old;
- +
- +- evt->event_handler(evt);
- ++ /* den alten Capturewert behalten*/
- ++ aulSPEED_Val_Old = ulCap_Val;
- ++ }
- ++ }
- ++
- ++ }
- ++
- ++ if(ulStatus & GPT_OF1){
- ++
- ++ evt->event_handler(evt);
- ++ }
- ++
- ++ if(__raw_readl(timer_base + MX3_TCMP) < __raw_readl(timer_base + MX3_TCN)) evt->event_handler(evt);
- ++
- ++ return IRQ_HANDLED;
- +
- +- return IRQ_HANDLED;
- + }
- +
- ++
- ++
- ++/******************************************************************************/
- ++/*!
- ++
- ++\fn CC_adr
- ++
- ++\brief CC-Adresse setzen
- ++
- ++\return != 0 --> Fehler
- ++ 0 --> Erfolg
- ++
- ++\param ucChannel_nr Kanal Nr.
- ++ pulPWM_adr Addresse
- ++
- ++\author Marcel Gudert
- ++
- ++*******************************************************************************/
- ++int SPEED_read( u32 *ulSPEED_val )
- ++{
- ++ /*CC1*/
- ++
- ++ /* Wurden beide Werte ( Low und Highedge) aktualisiert? */
- ++ if(aulSPEED_Val1[SPEED_HIGH_EDGE] && aulSPEED_Val1[SPEED_LOW_EDGE]){
- ++ /* neuen Wert berechnen */
- ++ aulSPEED_Val = aulSPEED_Val1[SPEED_HIGH_EDGE] + aulSPEED_Val1[SPEED_LOW_EDGE];
- ++ /* die Capture Werte löschen */
- ++ aulSPEED_Val1[SPEED_HIGH_EDGE] = 0;
- ++ aulSPEED_Val1[SPEED_LOW_EDGE] = 0;
- ++
- ++ /* Flag rücksetzen */
- ++ aucSPEED_Stat = 0;
- ++ }
- ++
- ++ /* Werte übergeben */
- ++ *ulSPEED_val = aulSPEED_Val / 113;
- ++
- ++ return 0;
- ++
- ++} /* eofn: */
- ++
- ++EXPORT_SYMBOL(SPEED_read);
- ++
- ++/******************************************************************************/
- ++/*!
- ++\fn SPEED_reset_status
- ++
- ++\brief CC-Event Ruecksetzen
- ++
- ++\return != 0 --> Fehler
- ++ 0 --> Erfolg
- ++\author Marcel Gudert
- ++
- ++*******************************************************************************/
- ++int SPEED_reset_status(void)
- ++{
- ++
- ++
- ++ /* Flags setzen */
- ++ aucSPEED_Stat = 1;
- ++
- ++ return 0;
- ++
- ++} /* eofn: SPEED_Stopp */
- ++
- ++EXPORT_SYMBOL(SPEED_reset_status);
- ++
- ++
- ++
- ++/******************************************************************************/
- ++/*!
- ++
- ++\fn SPEED_adr SPEED_read();
- ++
- ++
- ++\brief CC-Adresse setzen
- ++
- ++\return != 0 --> Fehler
- ++ 0 --> Erfolg
- ++
- ++\param ucChannel_nr Kanal Nr.
- ++ pulPWM_adr Addresse
- ++
- ++\author Marcel Gudert
- ++
- ++*******************************************************************************/
- ++int SPEED_get_status(void)
- ++{
- ++ return (int)aucSPEED_Stat;
- ++
- ++
- ++} /* eofn: */
- ++
- ++EXPORT_SYMBOL(SPEED_get_status);
- ++
- ++
- ++
- + static struct irqaction mxc_timer_irq = {
- + .name = "i.MX Timer Tick",
- + .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
- +@@ -297,8 +513,8 @@
- + #endif
- + } else if (cpu_is_mx2()) {
- + #ifdef CONFIG_ARCH_MX2
- +- timer_base = IO_ADDRESS(GPT1_BASE_ADDR);
- +- irq = MXC_INT_GPT1;
- ++ timer_base = IO_ADDRESS(GPT3_BASE_ADDR);
- ++ irq = MXC_INT_GPT3;
- + #endif
- + } else if (cpu_is_mx3()) {
- + #ifdef CONFIG_ARCH_MX3
- +@@ -318,7 +534,7 @@
- + __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */
- +
- + if (timer_is_v2())
- +- tctl_val = MX3_TCTL_CLK_PER | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN;
- ++ tctl_val = MX3_TCTL_CLK_PER | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN | (3<<16);
- + else
- + tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN;
- +
- +
- +
Quantron oldsvn r2782 motorbrücke pmux diff
Posted by Anonymous on Wed 28th Nov 2018 15:41
raw | new post
view followups (newest first): Quantron motorbrückenpatch oldsvn r2782 motorbrücke pmux diff by Anonymous
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.