---
.gitignore | 47
Documentation/DocBook/Makefile | 3
Documentation/DocBook/kgdb.tmpl | 234
Documentation/arm/STM-Nomadik/HOWTO-add_newboard.txt | 111
Documentation/arm/STM-Nomadik/HOWTO-nfsboot.txt | 106
Documentation/arm/STM-Nomadik/debug_strategy.txt | 66
Documentation/arm/STM-Nomadik/dma_user_guide.txt | 420
Documentation/arm/STM-Nomadik/faqs.txt | 53
Documentation/arm/STM-Nomadik/gpio_user_guide.txt | 140
Documentation/arm/STM-Nomadik/irq_usrguide.txt | 171
Documentation/arm/STM-Nomadik/power_management.txt | 122
MAINTAINERS | 9
Makefile | 18
arch/arm/Kconfig | 25
arch/arm/Makefile | 34
arch/arm/common/rtctime.c | 4
arch/arm/configs/ndk10_defconfig | 1205 +
arch/arm/configs/ndk15_defconfig | 1221 +
arch/arm/configs/ndk15b06_defconfig | 1221 +
arch/arm/configs/nhk15_defconfig | 1458 +
arch/arm/kernel/Makefile | 1
arch/arm/kernel/armksyms.c | 14
arch/arm/kernel/dma.c | 1
arch/arm/kernel/entry-armv.S | 2
arch/arm/kernel/irq.c | 12
arch/arm/kernel/kgdb-jmp.S | 30
arch/arm/kernel/kgdb.c | 208
arch/arm/kernel/setup.c | 5
arch/arm/kernel/traps.c | 11
arch/arm/lib/Makefile | 2
arch/arm/lib/gcclib.h | 25
arch/arm/lib/longlong.h | 184
arch/arm/lib/udivdi3.c | 246
arch/arm/mach-nomadik/Kconfig-nomadik | 267
arch/arm/mach-nomadik/Makefile | 166
arch/arm/mach-nomadik/Makefile.boot | 4
arch/arm/mach-nomadik/clock.c | 127
arch/arm/mach-nomadik/clock.h | 25
arch/arm/mach-nomadik/cpu.c | 293
arch/arm/mach-nomadik/create_kconfig.pl | 55
arch/arm/mach-nomadik/deep_sleep.S | 655
arch/arm/mach-nomadik/dfs.S | 355
arch/arm/mach-nomadik/dma.c | 1337 +
arch/arm/mach-nomadik/fsmc.c | 113
arch/arm/mach-nomadik/gpio.c | 916 +
arch/arm/mach-nomadik/irq.c | 231
arch/arm/mach-nomadik/l2cc.c | 152
arch/arm/mach-nomadik/msp.c | 2062 ++
arch/arm/mach-nomadik/msp.h | 383
arch/arm/mach-nomadik/mtu.c | 589
arch/arm/mach-nomadik/ndk10_cut_a1_Kconfig | 28
arch/arm/mach-nomadik/ndk10_cut_b06_Kconfig | 35
arch/arm/mach-nomadik/ndk10_cut_b0_Kconfig | 35
arch/arm/mach-nomadik/ndk10_devices.c | 1225 +
arch/arm/mach-nomadik/ndk15_devices.c | 1001 +
arch/arm/mach-nomadik/ndk15_rev2_b_03_Kconfig | 37
arch/arm/mach-nomadik/ndk15_rev2_b_05_Kconfig | 37
arch/arm/mach-nomadik/ndk15_rev2_b_06_Kconfig | 42
arch/arm/mach-nomadik/ndk15_rev3_c_02_Kconfig | 42
arch/arm/mach-nomadik/ndk15c02_devices.c | 1023 +
arch/arm/mach-nomadik/nhk15_Kconfig | 36
arch/arm/mach-nomadik/nhk15_devices.c | 1009 +
arch/arm/mach-nomadik/normal.S | 199
arch/arm/mach-nomadik/pm.c | 79
arch/arm/mach-nomadik/power.c | 1316 +
arch/arm/mach-nomadik/rtc.c | 327
arch/arm/mach-nomadik/sleep.c | 280
arch/arm/mach-nomadik/slow.S | 199
arch/arm/mach-nomadik/soft_sleep.S | 206
arch/arm/mach-nomadik/ssp.c | 930 +
arch/arm/mach-nomadik/stn8810_devices.c | 1071 +
arch/arm/mach-nomadik/stn8815_devices.c | 1971 ++
arch/arm/mach-nomadik/timer.c | 366
arch/arm/mm/Kconfig | 23
arch/arm/mm/extable.c | 7
arch/arm/mm/init.c | 1
arch/arm/mm/proc-arm926.S | 30
arch/arm/oprofile/common.c | 3
drivers/Makefile | 2
drivers/char/keyboard.c | 1
drivers/cpufreq/Kconfig | 4
drivers/hwmon/Kconfig | 13
drivers/hwmon/Makefile | 1
drivers/hwmon/lis3lv02dl.c | 489
drivers/i2c/Kconfig | 1
drivers/i2c/Makefile | 3
drivers/i2c/busses/Kconfig | 10
drivers/i2c/busses/Makefile | 22
drivers/i2c/busses/i2c-nomadik.c | 1250 +
drivers/i2c/busses/i2c-nomadik.h | 93
drivers/i2c/busses/i2c-stn8810.c | 1723 ++
drivers/i2c/busses/i2c-stn8815.c | 1817 ++
drivers/i2c/chips/Kconfig | 9
drivers/i2c/chips/Makefile | 6
drivers/i2c/chips/epio-nomadik.c | 195
drivers/input/input.c | 13
drivers/input/keyboard/Kconfig | 13
drivers/input/keyboard/Makefile | 7
drivers/input/keyboard/kpd-nomadik.c | 359
drivers/input/touchscreen/Kconfig | 20
drivers/input/touchscreen/Makefile | 8
drivers/input/touchscreen/touchp-nomadik.c | 755 +
drivers/input/touchscreen/touchp2003-nomadik.c | 566
drivers/media/Kconfig | 2
drivers/media/Makefile | 4
drivers/media/nomadik_mm/Kconfig | 23
drivers/media/nomadik_mm/Makefile | 8
drivers/media/nomadik_mm/hcl/hloader/hloader.c | 3632 ++++
drivers/media/nomadik_mm/hcl/hloader/hloader.h | 170
drivers/media/nomadik_mm/hcl/hloader/hloader_p.h | 451
drivers/media/nomadik_mm/hcl/include/debug.h | 316
drivers/media/nomadik_mm/hcl/include/hcl_defs.h | 290
drivers/media/nomadik_mm/hcl/include/hloader.h | 170
drivers/media/nomadik_mm/hcl/include/mupoc_mapping.h | 1761 ++
drivers/media/nomadik_mm/hcl/include/platform_os.h | 72
drivers/media/nomadik_mm/hcl/include/sva.h | 2148 ++
drivers/media/nomadik_mm/hcl/saa/audio_services.c | 142
drivers/media/nomadik_mm/hcl/saa/audio_services.h | 39
drivers/media/nomadik_mm/hcl/saa/ha_api_params.h | 1064 +
drivers/media/nomadik_mm/hcl/saa/ha_codec_info.h | 204
drivers/media/nomadik_mm/hcl/saa/ha_codec_params.h | 686
drivers/media/nomadik_mm/hcl/saa/ha_effect_info.h | 122
drivers/media/nomadik_mm/hcl/saa/ha_effect_params.h | 1342 +
drivers/media/nomadik_mm/hcl/saa/ha_hcl_fw_interface.h | 163
drivers/media/nomadik_mm/hcl/saa/hti.c | 271
drivers/media/nomadik_mm/hcl/saa/hti.h | 159
drivers/media/nomadik_mm/hcl/saa/hti_protocol.h | 134
drivers/media/nomadik_mm/hcl/saa/saa.c | 2538 +++
drivers/media/nomadik_mm/hcl/saa/saa.h | 306
drivers/media/nomadik_mm/hcl/saa/saa_base.c | 557
drivers/media/nomadik_mm/hcl/saa/saa_hwp.h | 275
drivers/media/nomadik_mm/hcl/saa/saa_irq.c | 432
drivers/media/nomadik_mm/hcl/saa/saap.h | 160
drivers/media/nomadik_mm/hcl/sva/common/sva_capabilities.c | 63
drivers/media/nomadik_mm/hcl/sva/common/sva_capabilities.h | 46
drivers/media/nomadik_mm/hcl/sva/common/sva_fifo.h | 335
drivers/media/nomadik_mm/hcl/sva/common/sva_hwp.h | 646
drivers/media/nomadik_mm/hcl/sva/common/sva_internalneeds.c | 131
drivers/media/nomadik_mm/hcl/sva/common/sva_internalneeds.h | 61
drivers/media/nomadik_mm/hcl/sva/common/sva_service.h | 337
drivers/media/nomadik_mm/hcl/sva/common/sva_timemgt.c | 486
drivers/media/nomadik_mm/hcl/sva/common/sva_timemgt.h | 80
drivers/media/nomadik_mm/hcl/sva/common/sva_timemgtp.h | 49
drivers/media/nomadik_mm/hcl/sva/common/svap.h | 188
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264.c | 3030 ++++
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264.h | 110
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264_dpb.c | 3101 ++++
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264_dpb.h | 232
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264_dpbp.h | 98
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264_slicemap.c | 312
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264_slicemap.h | 53
drivers/media/nomadik_mm/hcl/sva/decode/h264/sva_dc_h264p.h | 156
drivers/media/nomadik_mm/hcl/sva/decode/mpeg2/sva_dc_mpeg2.c | 2126 ++
drivers/media/nomadik_mm/hcl/sva/decode/mpeg2/sva_dc_mpeg2.h | 181
drivers/media/nomadik_mm/hcl/sva/decode/mpeg2/sva_dc_mpeg2p.c | 789 +
drivers/media/nomadik_mm/hcl/sva/decode/mpeg2/sva_dc_mpeg2p.h | 35
drivers/media/nomadik_mm/hcl/sva/decode/mpeg4/sva_dc_mpeg4.c | 2211 ++
drivers/media/nomadik_mm/hcl/sva/decode/mpeg4/sva_dc_mpeg4.h | 170
drivers/media/nomadik_mm/hcl/sva/decode/mpeg4/sva_dc_mpeg4p.c | 686
drivers/media/nomadik_mm/hcl/sva/decode/mpeg4/sva_dc_mpeg4p.h | 35
drivers/media/nomadik_mm/hcl/sva/decode/sva.h | 18
drivers/media/nomadik_mm/hcl/sva/decode/sva_dc_algo.h | 135
drivers/media/nomadik_mm/hcl/sva/decode/sva_decode.c | 2357 +++
drivers/media/nomadik_mm/hcl/sva/decode/sva_decode.h | 97
drivers/media/nomadik_mm/hcl/sva/decode/sva_decodep.c | 655
drivers/media/nomadik_mm/hcl/sva/decode/sva_decodep.h | 364
drivers/media/nomadik_mm/hcl/sva/decode/sva_decodepp.h | 40
drivers/media/nomadik_mm/hcl/sva/decode/vc1/sva_dc_vc1.c | 2044 ++
drivers/media/nomadik_mm/hcl/sva/decode/vc1/sva_dc_vc1.h | 194
drivers/media/nomadik_mm/hcl/sva/decode/vc1/sva_dc_vc1p.c | 714
drivers/media/nomadik_mm/hcl/sva/decode/vc1/sva_dc_vc1p.h | 37
drivers/media/nomadik_mm/hcl/sva/display/sva_display.c | 5661 +++++++
drivers/media/nomadik_mm/hcl/sva/display/sva_display.h | 99
drivers/media/nomadik_mm/hcl/sva/display/sva_displayp.h | 424
drivers/media/nomadik_mm/hcl/sva/encode/brc/sva_brc.c | 3648 ++++
drivers/media/nomadik_mm/hcl/sva/encode/brc/sva_brc.h | 112
drivers/media/nomadik_mm/hcl/sva/encode/brc/sva_brcp.h | 262
drivers/media/nomadik_mm/hcl/sva/encode/h264/sva_ec_h264.c | 4739 ++++++
drivers/media/nomadik_mm/hcl/sva/encode/h264/sva_ec_h264.h | 79
drivers/media/nomadik_mm/hcl/sva/encode/h264/sva_ec_h264p.h | 646
drivers/media/nomadik_mm/hcl/sva/encode/mpeg4/sva_ec_mpeg4.c | 2556 +++
drivers/media/nomadik_mm/hcl/sva/encode/mpeg4/sva_ec_mpeg4.h | 69
drivers/media/nomadik_mm/hcl/sva/encode/mpeg4/sva_ec_mpeg4p.h | 246
drivers/media/nomadik_mm/hcl/sva/encode/sva_ec_algo.h | 187
drivers/media/nomadik_mm/hcl/sva/encode/sva_encode.c | 4594 ++++++
drivers/media/nomadik_mm/hcl/sva/encode/sva_encode.h | 90
drivers/media/nomadik_mm/hcl/sva/encode/sva_encodep.h | 340
drivers/media/nomadik_mm/hcl/sva/events_management/sva_eventmgt.c | 896 +
drivers/media/nomadik_mm/hcl/sva/events_management/sva_eventmgt.h | 97
drivers/media/nomadik_mm/hcl/sva/events_management/sva_eventmgtp.h | 84
drivers/media/nomadik_mm/hcl/sva/events_management/sva_irqmgt.c | 225
drivers/media/nomadik_mm/hcl/sva/events_management/sva_irqmgt.h | 42
drivers/media/nomadik_mm/hcl/sva/firmware_management/sva_fwmgt.c | 1907 ++
drivers/media/nomadik_mm/hcl/sva/firmware_management/sva_fwmgt.h | 180
drivers/media/nomadik_mm/hcl/sva/firmware_management/sva_fwmgtp.h | 304
drivers/media/nomadik_mm/hcl/sva/grab/sva_grab.c | 3810 +++++
drivers/media/nomadik_mm/hcl/sva/grab/sva_grab.h | 88
drivers/media/nomadik_mm/hcl/sva/grab/sva_grabp.h | 411
drivers/media/nomadik_mm/hcl/sva/include/sva_bufferlistmgt.h | 87
drivers/media/nomadik_mm/hcl/sva/include/sva_buffermgt.h | 111
drivers/media/nomadik_mm/hcl/sva/include/sva_capabilities.h | 46
drivers/media/nomadik_mm/hcl/sva/include/sva_dc_mpeg2.h | 181
drivers/media/nomadik_mm/hcl/sva/include/sva_decode.h | 97
drivers/media/nomadik_mm/hcl/sva/include/sva_display.h | 99
drivers/media/nomadik_mm/hcl/sva/include/sva_encode.h | 90
drivers/media/nomadik_mm/hcl/sva/include/sva_eventmgt.h | 97
drivers/media/nomadik_mm/hcl/sva/include/sva_fifo.h | 335
drivers/media/nomadik_mm/hcl/sva/include/sva_fwmgt.h | 180
drivers/media/nomadik_mm/hcl/sva/include/sva_grab.h | 89
drivers/media/nomadik_mm/hcl/sva/include/sva_host_interface.h | 290
drivers/media/nomadik_mm/hcl/sva/include/sva_internalneeds.h | 60
drivers/media/nomadik_mm/hcl/sva/include/sva_irqmgt.h | 42
drivers/media/nomadik_mm/hcl/sva/include/sva_memorymgt.h | 163
drivers/media/nomadik_mm/hcl/sva/include/sva_openservice.h | 62
drivers/media/nomadik_mm/hcl/sva/include/sva_openservicemgt.h | 71
drivers/media/nomadik_mm/hcl/sva/include/sva_service.h | 337
drivers/media/nomadik_mm/hcl/sva/include/sva_stab.h | 89
drivers/media/nomadik_mm/hcl/sva/include/sva_still_decode.h | 111
drivers/media/nomadik_mm/hcl/sva/include/sva_still_encode.h | 96
drivers/media/nomadik_mm/hcl/sva/include/sva_taskmgt.h | 403
drivers/media/nomadik_mm/hcl/sva/include/sva_timemgt.h | 80
drivers/media/nomadik_mm/hcl/sva/include/sva_tvo.h | 89
drivers/media/nomadik_mm/hcl/sva/include/svap.h | 193
drivers/media/nomadik_mm/hcl/sva/include/t1xhv_host_interface.h | 1725 ++
drivers/media/nomadik_mm/hcl/sva/include/t1xhv_retarget.h | 41
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_bufferlistmgt.c | 541
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_bufferlistmgt.h | 87
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_bufferlistmgtp.h | 73
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_buffermgt.c | 1212 +
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_buffermgt.h | 111
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_buffermgtp.h | 83
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_memorymgt.c | 1578 ++
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_memorymgt.h | 163
drivers/media/nomadik_mm/hcl/sva/memory_management/sva_memorymgtp.h | 105
drivers/media/nomadik_mm/hcl/sva/openservice_management/sva_openservice.h | 62
drivers/media/nomadik_mm/hcl/sva/openservice_management/sva_openservicemgt.c | 620
drivers/media/nomadik_mm/hcl/sva/openservice_management/sva_openservicemgt.h | 71
drivers/media/nomadik_mm/hcl/sva/openservice_management/sva_openservicemgtp.h | 56
drivers/media/nomadik_mm/hcl/sva/stab/sva_stab.c | 2855 +++
drivers/media/nomadik_mm/hcl/sva/stab/sva_stab.h | 89
drivers/media/nomadik_mm/hcl/sva/stab/sva_stabp.h | 284
drivers/media/nomadik_mm/hcl/sva/still_decode/jpeg/sva_sdc_jpeg.c | 1047 +
drivers/media/nomadik_mm/hcl/sva/still_decode/jpeg/sva_sdc_jpeg.h | 70
drivers/media/nomadik_mm/hcl/sva/still_decode/jpeg/sva_sdc_jpegp.h | 74
drivers/media/nomadik_mm/hcl/sva/still_decode/sva_sdc_algo.h | 96
drivers/media/nomadik_mm/hcl/sva/still_decode/sva_still_decode.c | 3174 ++++
drivers/media/nomadik_mm/hcl/sva/still_decode/sva_still_decode.h | 111
drivers/media/nomadik_mm/hcl/sva/still_decode/sva_still_decodep.h | 267
drivers/media/nomadik_mm/hcl/sva/still_encode/jpeg/sva_sec_jpeg.c | 682
drivers/media/nomadik_mm/hcl/sva/still_encode/jpeg/sva_sec_jpeg.h | 63
drivers/media/nomadik_mm/hcl/sva/still_encode/jpeg/sva_sec_jpegp.h | 62
drivers/media/nomadik_mm/hcl/sva/still_encode/sva_sec_algo.h | 152
drivers/media/nomadik_mm/hcl/sva/still_encode/sva_still_encode.c | 3752 ++++
drivers/media/nomadik_mm/hcl/sva/still_encode/sva_still_encode.h | 96
drivers/media/nomadik_mm/hcl/sva/still_encode/sva_still_encodep.h | 248
drivers/media/nomadik_mm/hcl/sva/sva.c | 1827 ++
drivers/media/nomadik_mm/hcl/sva/sva.h | 2148 ++
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_hwtaskmgt.c | 1701 ++
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_hwtaskmgt.h | 93
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_hwtaskmgtp.h | 134
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_taskmgt.c | 3573 ++++
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_taskmgt.h | 403
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_taskmgtp.h | 359
drivers/media/nomadik_mm/hcl/sva/tasks_management/sva_taskschl.c | 19
drivers/media/nomadik_mm/hcl/sva/tvo/sva_tvo.c | 2478 +++
drivers/media/nomadik_mm/hcl/sva/tvo/sva_tvo.h | 89
drivers/media/nomadik_mm/hcl/sva/tvo/sva_tvop.h | 278
drivers/media/nomadik_mm/opengl/Makefile | 18
drivers/media/nomadik_mm/opengl/ogl.c | 565
drivers/media/nomadik_mm/opengl/ogl.h | 65
drivers/media/nomadik_mm/opengl/ogl_ioctl.h | 56
drivers/media/nomadik_mm/saa/Makefile | 20
drivers/media/nomadik_mm/saa/README | 72
drivers/media/nomadik_mm/saa/nomadik-fwload.c | 229
drivers/media/nomadik_mm/saa/nomadik-fwload.h | 47
drivers/media/nomadik_mm/saa/nomadik-saa.c | 4406 +++++
drivers/media/nomadik_mm/saa/nomadik-saa.h | 204
drivers/media/nomadik_mm/saa/saaioctl.h | 498
drivers/media/nomadik_mm/sva/Makefile | 58
drivers/media/nomadik_mm/sva/nomadik_camera.h | 206
drivers/media/nomadik_mm/sva/nomadik_defs.h | 76
drivers/media/nomadik_mm/sva/nomadik_pepperpot.c | 1189 +
drivers/media/nomadik_mm/sva/nomadik_pepperpot.h | 153
drivers/media/nomadik_mm/sva/nomadik_sva.c | 4951 ++++++
drivers/media/nomadik_mm/sva/nomadik_sva.h | 225
drivers/media/nomadik_mm/sva/nomadik_sva_mpeg4.c | 432
drivers/media/nomadik_mm/sva/nomadik_sva_services.h | 3826 +++++
drivers/media/nomadik_mm/sva/nomadik_sva_utils.c | 964 +
drivers/media/nomadik_mm/sva/nomadik_sva_utils.h | 49
drivers/media/nomadik_mm/sva/nomadik_sva_vpip.c | 6984 +++++++++
drivers/media/nomadik_mm/sva/nomadik_sva_vpip.h | 589
drivers/media/video/Kconfig | 7
drivers/media/video/Makefile | 8
drivers/media/video/hcl_defs.h | 280
drivers/media/video/nomadik_camera.h | 206
drivers/media/video/nomadik_defs.h | 76
drivers/media/video/nomadik_sva.h | 225
drivers/media/video/nomadik_sva_services.h | 3832 +++++
drivers/media/video/nomadik_sva_utils.h | 49
drivers/media/video/platform_os.h | 55
drivers/media/video/sva.h | 2148 ++
drivers/media/video/v4l2-nomadik.c | 1590 ++
drivers/media/video/v4l2-nomadik.h | 70
drivers/misc/Kconfig | 27
drivers/misc/Makefile | 4
drivers/misc/batt-nomadik.c | 1307 +
drivers/misc/etm-nomadik.c | 207
drivers/misc/pexp-nomadik.c | 2847 +++
drivers/misc/sif-nomadik.c | 560
drivers/mmc/Kconfig | 27
drivers/mmc/Makefile | 9
drivers/mmc/mmc-nomadik.c | 1435 +
drivers/mtd/maps/Kconfig | 7
drivers/mtd/maps/Makefile | 11
drivers/mtd/maps/norflash-nomadik.c | 411
drivers/mtd/nand/Kconfig | 6
drivers/mtd/nand/Makefile | 5
drivers/mtd/nand/nandflash-nomadik.c | 296
drivers/mtd/onenand/Kconfig | 38
drivers/mtd/onenand/Makefile | 3
drivers/mtd/onenand/generic.c | 62
drivers/mtd/onenand/onenand_base.c | 1139 +
drivers/mtd/onenand/onenand_bbt.c | 33
drivers/mtd/onenand/onenand_sim.c | 495
drivers/net/Makefile | 1
drivers/net/kgdboe.c | 294
drivers/net/smc91x.c | 100
drivers/net/smc91x.h | 133
drivers/serial/amba-pl011.c | 101
drivers/spi/Kconfig | 8
drivers/spi/Makefile | 2
drivers/spi/spi-nomadik.c | 1000 +
drivers/usb/Kconfig | 2
drivers/usb/Makefile | 1
drivers/usb/gadget/file_storage.c | 15
drivers/usb/nomadik/Kconfig | 176
drivers/usb/nomadik/Makefile | 97
drivers/usb/nomadik/board.h | 58
drivers/usb/nomadik/debug.h | 104
drivers/usb/nomadik/dma.h | 308
drivers/usb/nomadik/g_ep0.c | 858 +
drivers/usb/nomadik/logx | 1
drivers/usb/nomadik/musb_bus_direct.c | 371
drivers/usb/nomadik/musb_cross.h | 131
drivers/usb/nomadik/musb_debug.c | 190
drivers/usb/nomadik/musb_epdescriptors.h | 48
drivers/usb/nomadik/musb_epfifocfg.c | 429
drivers/usb/nomadik/musb_hcd.c | 869 +
drivers/usb/nomadik/musb_host.c | 2791 +++
drivers/usb/nomadik/musb_host.h | 101
drivers/usb/nomadik/musb_ioctl.c | 321
drivers/usb/nomadik/musb_ioctl.h | 32
drivers/usb/nomadik/musb_plat_uds.c | 2306 +++
drivers/usb/nomadik/musb_procfs.c | 413
drivers/usb/nomadik/musb_virthub.c | 840 +
drivers/usb/nomadik/musb_virthub.h | 240
drivers/usb/nomadik/musbdefs.h | 828 +
drivers/usb/nomadik/musbhdrc.h | 315
drivers/usb/nomadik/musbhsfc.h | 150
drivers/usb/nomadik/nomadik_udc.c | 2845 +++
drivers/usb/nomadik/nomadik_udc.h | 663
drivers/usb/nomadik/otg_func.c | 196
drivers/usb/nomadik/otg_pwm.c | 46
drivers/usb/nomadik/plat_arc.h | 92
drivers/usb/nomadik/plat_cnf.h | 208
drivers/video/Makefile | 1
drivers/video/amba-clcd.c | 115
drivers/video/fbmem.c | 1
drivers/video/nomadik/Makefile | 15
drivers/video/nomadik/hcl/debug.h | 313
drivers/video/nomadik/hcl/hcl_defs.h | 286
drivers/video/nomadik/hcl/platform_os.h | 79
drivers/video/nomadik/hcl/sga.c | 3161 ++++
drivers/video/nomadik/hcl/sga.h | 937 +
drivers/video/nomadik/hcl/sga_irq.c | 206
drivers/video/nomadik/hcl/sga_irq.h | 99
drivers/video/nomadik/hcl/sga_irqp.h | 239
drivers/video/nomadik/hcl/sga_p.h | 175
drivers/video/nomadik/sga_defs.h | 87
drivers/video/nomadik/sga_err.h | 45
drivers/video/nomadik/sga_interface.h | 119
drivers/video/nomadik/sga_ioctlfns.c | 473
drivers/video/nomadik/sga_ioctlfns.h | 50
drivers/video/nomadik/sga_main.c | 651
drivers/video/nomadik/sga_main.h | 123
drivers/video/nomadik/sga_typs.h | 37
fs/Kconfig | 4
fs/Makefile | 3
fs/proc/proc_misc.c | 42
fs/yaffs2/Kconfig | 156
fs/yaffs2/Makefile | 10
fs/yaffs2/devextras.h | 264
fs/yaffs2/moduleconfig.h | 65
fs/yaffs2/yaffs_checkptrw.c | 404
fs/yaffs2/yaffs_checkptrw.h | 35
fs/yaffs2/yaffs_ecc.c | 331
fs/yaffs2/yaffs_ecc.h | 44
fs/yaffs2/yaffs_fs.c | 2297 +++
fs/yaffs2/yaffs_guts.c | 7532 ++++++++++
fs/yaffs2/yaffs_guts.h | 904 +
fs/yaffs2/yaffs_mtdif.c | 241
fs/yaffs2/yaffs_mtdif.h | 27
fs/yaffs2/yaffs_mtdif1.c | 369
fs/yaffs2/yaffs_mtdif1.h | 28
fs/yaffs2/yaffs_mtdif2.c | 232
fs/yaffs2/yaffs_mtdif2.h | 29
fs/yaffs2/yaffs_nand.c | 134
fs/yaffs2/yaffs_nand.h | 44
fs/yaffs2/yaffs_nandemul2k.h | 39
fs/yaffs2/yaffs_packedtags1.c | 52
fs/yaffs2/yaffs_packedtags1.h | 37
fs/yaffs2/yaffs_packedtags2.c | 182
fs/yaffs2/yaffs_packedtags2.h | 38
fs/yaffs2/yaffs_qsort.c | 160
fs/yaffs2/yaffs_qsort.h | 23
fs/yaffs2/yaffs_tagscompat.c | 530
fs/yaffs2/yaffs_tagscompat.h | 40
fs/yaffs2/yaffs_tagsvalidity.c | 28
fs/yaffs2/yaffs_tagsvalidity.h | 24
fs/yaffs2/yaffsinterface.h | 21
fs/yaffs2/yportenv.h | 200
include/asm-arm/arch-nomadik/audiocodec.h | 444
include/asm-arm/arch-nomadik/bits.h | 61
include/asm-arm/arch-nomadik/debug-macro.S | 38
include/asm-arm/arch-nomadik/debug.h | 148
include/asm-arm/arch-nomadik/defs.h | 245
include/asm-arm/arch-nomadik/dma.h | 362
include/asm-arm/arch-nomadik/entry-macro.S | 210
include/asm-arm/arch-nomadik/epio.h | 24
include/asm-arm/arch-nomadik/fsmc.h | 203
include/asm-arm/arch-nomadik/gpio.h | 529
include/asm-arm/arch-nomadik/hardware.h | 107
include/asm-arm/arch-nomadik/i2c.h | 419
include/asm-arm/arch-nomadik/io.h | 37
include/asm-arm/arch-nomadik/irqs.h | 137
include/asm-arm/arch-nomadik/kpd.h | 56
include/asm-arm/arch-nomadik/memory.h | 41
include/asm-arm/arch-nomadik/mmc.h | 234
include/asm-arm/arch-nomadik/msp-spi.h | 343
include/asm-arm/arch-nomadik/msp.h | 322
include/asm-arm/arch-nomadik/mtu.h | 90
include/asm-arm/arch-nomadik/nandflash.h | 42
include/asm-arm/arch-nomadik/ndk10_devices.h | 160
include/asm-arm/arch-nomadik/ndk15_devices.h | 248
include/asm-arm/arch-nomadik/ndk15c02_devices.h | 169
include/asm-arm/arch-nomadik/nhk15_devices.h | 131
include/asm-arm/arch-nomadik/param.h | 19
include/asm-arm/arch-nomadik/pexp.h | 355
include/asm-arm/arch-nomadik/power.h | 180
include/asm-arm/arch-nomadik/smp.h | 19
include/asm-arm/arch-nomadik/spi.h | 521
include/asm-arm/arch-nomadik/ssp-spi.h | 280
include/asm-arm/arch-nomadik/stn8810_devices.h | 120
include/asm-arm/arch-nomadik/stn8815_devices.h | 165
include/asm-arm/arch-nomadik/stw5094ap.h | 176
include/asm-arm/arch-nomadik/stw5095.h | 1387 +
include/asm-arm/arch-nomadik/sva.h | 43
include/asm-arm/arch-nomadik/system.h | 62
include/asm-arm/arch-nomadik/timex.h | 71
include/asm-arm/arch-nomadik/touchp.h | 145
include/asm-arm/arch-nomadik/touchp2003.h | 42
include/asm-arm/arch-nomadik/udc.h | 490
include/asm-arm/arch-nomadik/uncompress.h | 71
include/asm-arm/arch-nomadik/vmalloc.h | 32
include/asm-arm/kgdb.h | 91
include/asm-arm/system.h | 41
include/asm-generic/kgdb.h | 34
include/linux/amba/clcd.h | 24
include/linux/dwarf2-lang.h | 300
include/linux/dwarf2.h | 775 +
include/linux/i2c.h | 13
include/linux/kgdb.h | 271
include/linux/miscdevice.h | 1
include/linux/module.h | 28
include/linux/mtd/bbm.h | 11
include/linux/mtd/mtd.h | 1
include/linux/mtd/nand.h | 52
include/linux/mtd/onenand.h | 31
include/linux/mtd/onenand_regs.h | 8
include/linux/netpoll.h | 2
include/linux/usb.h | 4
include/linux/v4l2-nomadikdefs.h | 12
include/linux/videodev2.h | 11
init/Kconfig | 15
kernel/Makefile | 1
kernel/kgdb.c | 1963 ++
kernel/module.c | 216
kernel/pid.c | 11
kernel/power/main.c | 2
kernel/sched.c | 6
kernel/softlockup.c | 4
kernel/timer.c | 8
lib/Kconfig.debug | 79
net/core/netpoll.c | 5
net/sunrpc/xprtsock.c | 5
scripts/Makefile | 1
scripts/Makefile.modpost | 2
scripts/dwarfh.awk | 19
scripts/kconfig/Makefile | 32
scripts/ksymhash/Makefile | 35
scripts/ksymhash/elflib.c | 164
scripts/ksymhash/elflib.h | 142
scripts/ksymhash/empty.c | 1
scripts/ksymhash/ksymhash.c | 126
scripts/ksymhash/mk_elfconfig.c | 66
scripts/mod/modpost.c | 23
sound/Kconfig | 36
sound/Makefile | 9
sound/arm/Kconfig | 11
sound/arm/Makefile | 3
sound/arm/nomadik_alsa.c | 1038 +
sound/arm/nomadik_alsa.h | 83
sound/nomadik_stw5094.c | 2280 +++
sound/nomadik_stw5095.c | 3529 ++++
514 files changed, 244969 insertions(+), 622 deletions(-)
--- linux-2.6.20.orig/.gitignore
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# NOTE! Don't add files that are generated in specific
-# subdirectories here. Add them in the ".gitignore" file
-# in that subdirectory instead.
-#
-# Normal rules
-#
-.*
-*.o
-*.a
-*.s
-*.ko
-*.so
-*.mod.c
-*.i
-*.lst
-*.symtypes
-
-#
-# Top-level generic files
-#
-tags
-TAGS
-vmlinux*
-System.map
-Module.symvers
-
-#
-# Generated include files
-#
-include/asm
-include/asm-*/asm-offsets.h
-include/config
-include/linux/autoconf.h
-include/linux/compile.h
-include/linux/version.h
-include/linux/utsrelease.h
-
-# stgit generated dirs
-patches-*
-
-# quilt's files
-patches
-series
-
-# cscope files
-cscope.*
--- linux-2.6.20.orig/Documentation/DocBook/Makefile
+++ linux-2.6.20/Documentation/DocBook/Makefile
@@ -9,11 +9,12 @@
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
procfs-guide.xml writing_usb_driver.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
- genericirq.xml
+ genericirq.xml \
+ kgdb.xml
###
# The build process is as follows (targets):
# (xmldocs)
# file.tmpl --> file.xml +--> file.ps (psdocs)
--- /dev/null
+++ linux-2.6.20/Documentation/DocBook/kgdb.tmpl
@@ -0,0 +1,234 @@
+
+
+
+
+
+ KGDB Internals
+
+
+
+ Tom
+ Rini
+
+
+ trini@kernel.crashing.org
+
+
+
+
+
+
+
+ Amit S.
+ Kale
+
+
+ amitkale@linsyssoft.com
+
+
+
+
+
+
+ 2004-2005
+ MontaVista Software, Inc.
+
+
+ 2004
+ Amit S. Kale
+
+
+
+
+ This file is licensed under the terms of the GNU General Public License
+ version 2. This program is licensed "as is" without any warranty of any
+ kind, whether express or implied.
+
+
+
+
+
+
+
+ Introduction
+
+ kgdb is a source level debugger for linux kernel. It is used along
+ with gdb to debug a linux kernel. Kernel developers can debug a kernel
+ similar to application programs with the use of kgdb. It makes it
+ possible to place breakpoints in kernel code, step through the code
+ and observe variables.
+
+
+ Two machines are required for using kgdb. One of these machines is a
+ development machine and the other is a test machine. The machines are
+ typically connected through a serial line, a null-modem cable which
+ connects their serial ports. It is also possible however, to use an
+ ethernet connection between the machines. The kernel to be debugged
+ runs on the test machine. gdb runs on the development machine. The
+ serial line or ethernet connection is used by gdb to communicate to
+ the kernel being debugged.
+
+
+
+ Compiling a kernel
+
+ To enable CONFIG_KGDB, look under the "Kernel debugging"
+ and then select "KGDB: kernel debugging with remote gdb".
+
+
+ The first choice for I/O is CONFIG_KGDB_ONLY_MODULES.
+ This means that you will only be able to use KGDB after loading a
+ kernel module that defines how you want to be able to talk with
+ KGDB. There are two other choices (more on some architectures) that
+ can be enabled as modules later, if not picked here.
+
+ The first of these is CONFIG_KGDB_8250_NOMODULE.
+ This has sub-options such as CONFIG_KGDB_SIMPLE_SERIAL
+ which toggles choosing the serial port by ttyS number or by specifying
+ a port and IRQ number.
+
+
+ The second of these choices on most systems for I/O is
+ CONFIG_KGDBOE. This requires that the machine to be
+ debugged has an ethernet card which supports the netpoll API, such as
+ the cards supported by CONFIG_E100. There are no
+ sub-options for this, but a kernel command line option is required.
+
+
+
+ Booting the kernel
+
+ The Kernel command line option kgdbwait makes kgdb
+ wait for gdb connection during booting of a kernel. If the
+ CONFIG_KGDB_8250 driver is used (or if applicable,
+ another serial driver) this breakpoint will happen very early on, before
+ console output. If you wish to change serial port information and you
+ have enabled both CONFIG_KGDB_8250 and
+ CONFIG_KGDB_SIMPLE_SERIAL then you must pass the option
+ kgdb8250=<io or mmio>,<address>,<baud
+ rate>,<irq> before kgdbwait.
+ The values io or mmio refer to
+ if the address being passed next needs to be memory mapped
+ (mmio) or not. The address must
+ be passed in hex and is the hardware address and will be remapped if
+ passed as mmio. The value
+ baud rate and irq are base-10.
+ The supported values for baud rate are
+ 9600, 19200,
+ 38400, 57600, and
+ 115200.
+
+
+ To have KGDB stop the kernel and wait, with the compiled values for the
+ serial driver, pass in: kgdbwait.
+
+
+ To specify the values of the serial port at boot:
+ kgdb8250=io,3f8,115200,3.
+ On IA64 this could also be:
+ kgdb8250=mmio,0xff5e0000,115200,74
+ And to have KGDB also stop the kernel and wait for GDB to connect, pass in
+ kgdbwait after this arguement.
+
+
+ To configure the CONFIG_KGDBOE driver, pass in
+ kgdboe=[src-port]@<src-ip>/[dev],[tgt-port]@<tgt-ip>/[tgt-macaddr]
+ where:
+
+ src-port (optional): source for UDP packets (defaults to 6443)
+ src-ip: source IP to use (interface address)
+ dev (optional): network interface (eth0)
+ tgt-port (optional): port GDB will use (defaults to 6442)
+ tgt-ip: IP address GDB will be connecting from
+ tgt-macaddr (optional): ethernet MAC address for logging agent (default is broadcast)
+
+
+
+ The CONFIG_KGDBOE driver can be reconfigured at run
+ time, if CONFIG_SYSFS and
+ CONFIG_MODULES by echo'ing a new config string to
+ /sys/module/kgdboe/parameter/kgdboe. The
+ driver can be unconfigured with the special string
+ not_configured.
+
+
+
+ Connecting gdb
+
+ If you have used any of the methods to have KGDB stop and create
+ an initial breakpoint described in the previous chapter, kgdb prints
+ the message "Waiting for connection from remote gdb..." on the console
+ and waits for connection from gdb. At this point you connect gdb to kgdb.
+
+
+ Example (serial):
+
+
+ % gdb ./vmlinux
+ (gdb) set remotebaud 115200
+ (gdb) target remote /dev/ttyS0
+
+
+ Example (ethernet):
+
+
+ % gdb ./vmlinux
+ (gdb) target remote udp:192.168.2.2:6443
+
+
+ Once connected, you can debug a kernel the way you would debug an
+ application program.
+
+
+
+ The common backend (required)
+
+ There are a few flags which must be set on every architecture in
+ their <asm/kgdb.h> file. These are:
+
+
+
+ NUMREGBYTES: The size in bytes of all of the registers, so
+ that we can ensure they will all fit into a packet.
+
+
+ BUFMAX: The size in bytes of the buffer GDB will read into.
+ This must be larger than NUMREGBYTES.
+
+
+ CACHE_FLUSH_IS_SAFE: Set to one if it always safe to call
+ flush_cache_range or flush_icache_range. On some architectures,
+ these functions may not be safe to call on SMP since we keep other
+ CPUs in a holding pattern.
+
+
+
+
+
+ There are also the following functions for the common backend,
+ found in kernel/kgdb.c that must be supplied by the
+ architecture-specific backend. No weak version of these is provided.
+
+!Iinclude/linux/kgdb.h
+
+
+ The common backend (optional)
+
+ These functions are part of the common backend, found in kernel/kgdb.c
+ and are optionally implemented. Some functions (with _hw_ in the name)
+ end up being required on arches which use hardware breakpoints.
+
+!Ikernel/kgdb.c
+
+
+ Driver-Specific Functions
+
+ Some of the I/O drivers have additional functions that can be
+ called, that are specific to the driver. Calls from other places
+ to these functions must be wrapped in #ifdefs for the driver in
+ question.
+
+!Idrivers/serial/8250_kgdb.c
+
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/HOWTO-add_newboard.txt
@@ -0,0 +1,111 @@
+Filename: ./Documentation/arm/STM-Nomadik/HOWTO-add_newboard.txt
+Author: Prafulla Wadaskar (prafulla.wadaskar@st.com)
+Owner: STMicroelectronics
+Purpose:
+ This HOWTO explains guidlines for addition of new Nomadik
+ board support to the kernel source code
+===============================================================================
+
+This document is valid subject to assumption -
+1. valid kernel source code with Nomadik support is available
+
+Nomadik BSP kernel file naming conventions
+============================================
+It is strongly recommended to follow below filename conventions while adding
+new board support for Nomadik
+1. All the Nomadik architecture specific code must be in mach-nomadik and
+ arch-nomadik folders in a kernel tree.
+2. Generic and Nomadik specific device drives may be located into the respective
+ folder in the kernel source tree (ex. nomadik keypad driver in
+ drivers/input/keyboard/kpd-nomadik.c)
+3. all Nomadik specific files in mach-nomadik and arch-nomadik folders should
+ be named as .c/h
+ (ex. gpio.h, msp.c)
+4. all Nomadik platform specific files are named as _.c/h
+ (ex. ndk10_devices.c, ndk15_devices.h)
+5. all Nomadik soc specific files are named as _.c/h
+ (ex. stn8810_devices.h, stn8815_devices.c)
+
+Important definations
+==============================
+1. target: It is a unique identity to describe supported board with a specific
+ board version and specific SOC version.
+ target is created by combination of board (i.e. platform) and
+ Nomadik chip version (i.e. soc)
+
+2. platform: It is refered for board to be supported.
+ One plaform may be supported by several targets
+ One plaform may be supported by several socs
+
+3. soc: It is refered for the Nomadik chip version to be suported.
+ same soc may be supported on several platforms
+
+Hence any Nomadik borad is identified as a "target" and supported by "soc"
+ specific code and "platform" specific code well interfaced with generic
+ code.
+
+Device driver Support for Nomadik:
+====================================
+1. All the drivers suported on a target can be either SOC or platform specific
+2. A platform specific code for all supported driver will be refered from a
+ single file _devices.c through device specific interface.
+3. A Nomadik chip specific code for all supported driver will be refered from a
+ single file _devices.c through device specific interface.
+4. Each device specific header file _devices.h and
+ _devices.h must be maintained to share a common hardware
+ parameters across the drivers. Those two files are included in
+ asm/arch/hardware.h which is further refered through asm/hardware.h
+ Hence any kernel code seeking for hardware specific information (like
+ base address, irqnos) can be made available by just including
+
+5. Each header file described here should have relevent declaration related to
+ the scope of its usage. ex. _devices.h should only have
+ platforms specific declration.
+
+Any Nomadik target can be supported by following set of files:-
+ arch/arch/mach-nomadik/_devices.c
+ inclue/asm-arm/arch-nomadik/_devices.h
+ arch/arch/mach-nomadik/_devices.c
+ inclue/asm-arm/arch-nomadik/_devices.h
+
+But Generally, New board support will be added for already suported SOCs
+hence, to add support for any new Nomadik target only three files need to be
+added, those are:-
+ arch/arch/mach-nomadik/_Kconfig
+ arch/arch/mach-nomadik/_devices.c
+ inclue/asm-arm/arch0-nomadik/_devices.h
+
+Steps to follow to add new target support for Nomadik
+========================================================
+1. Add ./arch/arm/mach-nomadik/_Kconfig file for board
+ configuration, specified here will reflect as machine name.
+
+ During make config/menuconfig arch/arm/mach-nomadik/Kconfig will be
+ checked, and if is not found, it will be created automatically using
+ all _Kconfig files and Kconfig_nomadik file.
+ 1. _Kconfig file contain board specific configuration
+ 2. Kconfig_nomadik contains generic configuration for all nomadik
+ platforms
+ for details refer provided ndk10_cut_a1_Kconfig file
+
+2. Add ./arch/arm/mach-nomadik/_devices.c file
+ This file contains all the platfrom specific functions and data
+ structures used by rest of the code. Any driver suported for Nomadik
+ platform must access all the paramters through this file
+ (for ex. base addres, irq number and other plaform specific data
+ structures and function)
+ It is recommended to refer such file for already suported platform
+
+3. Add ./include/asm-arm/arch-nomadik/_devices.h file
+ This file must contain all the declarations for this platform
+ which may be refered by the other drivers and kernel code.
+ Note that this file is refered by some assembly code hence the
+ content of this files must be maintained simple, standard and
+ generic.
+ It is recommended to refer such file for already suported platform
+
+With the above addition/modification New target support will be available.
+Select newly supported target in kernel configuration, build and execute
+the code on new target
+===============================================================================
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/HOWTO-nfsboot.txt
@@ -0,0 +1,106 @@
+This HOWTO esplains mounting the root file system via NFS on Nomadik Platform (nfsroot)
+
+As you know, all of us spend lot of time in-
+1. Unzip/mount initrd to put the modules/application under test
+2. Copying modules/applications to initrd
+3. Unmount/gzip operation with initrd
+4. Then load huge initrd and kernel each time to target board
+ for execution.
+
+So for each time even for a small change we need to repeat this process, and
+downloading and system re-initialization eats lot of our development time.
+Nfsroot is a good solution to overcome above issues.
+
+Root file system can be mounted via NFS (nfsroot) on host and can be accessed
+from your target machin.
+
+Advantages of this method are:-
+===============================
+1. No need to download ramdiks time to time (saves lot of time)
+2. Since file system is on NFS, runtime results/logs dooes not vanishes
+ in case of nomadik-system crash
+3. Since file system is on NFS, it is transperant to host and target
+4. Making, updating, mounting, unmounting, zipping, unzipping activities
+ associated with ramdisk can be totally avoided (saves lot of time)
+5. Offers comfortable and fast development environment
+
+Host configuration to enable root NFS:-
+========================================
+1. Copy a "target" folder from toolchain at some fixed path on your Linux
+ host
+2. Switch to the dev folder of newly created target folder and create
+ a node for console with command "mknod console c 5 1"
+3. Then swtich to the target folder and create a symbolic link with
+ command "ln -s /bin/busybox linuxrc
+4. FTP and TFTP should be enabled on the host system. You can check the
+ configuration by issuing the following command
+
+#> chkconfig --list | grep ftp
+
+Output should look like :-
+vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
+ gssftp: off
+ tftp: on
+
+Note: Method of enabling FTP can be different for different versions of Linux.
+
+5. NFS should be enabled. Same can also be checked with the following
+ command
+
+#> chkconfig --list | grep nfs
+
+Output should looklike
+nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
+
+6. Also, check the entries of the /etc/xinetd.d/tftp file accordingly.
+ In our case, it is :
+
+service tftp
+{
+ disable = no
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/sbin/in.tftpd
+ server_args = -T 100000000 -v -c -s
+/local_no_backup
+# server_args = -s /tftpboot
+ per_source = 11
+ cps = 100 2
+ flags = IPv4
+}
+
+7. Also make the entries in /etc/exports for the file systems that need
+ to be shared. For options used, please refer the man pages of exports.
+ In our case, it is :
+
+/rtrt *(rw,insecure,no_root_squash,async)
+/local_no_backup/target *(rw,insecure,no_root_squash,async)
+
+How to enable NFS feature in your development?
+===============================================
+1. Of cource you need to work on ethernet based environment
+2. Enable ethernet driver in your kernel image
+3. Enable following settings in your kernel image to enable nfsroot
+a. Networking options --->IP: kernel level autoconfiguration
+b. Networking options --->IP: BOOTP support
+c. File systems --->Network File Systems --->NFS file system support
+d. File systems --->Network File Systems --->Provide NFSv3 client support
+e. File systems --->Network File Systems --->Root file system on NFS
+4. Then compile kernel image, prepare uimage and download into the target
+5. Set the command line arguments as -
+
+ "set bootargs root=/dev/nfs nfsroot=://ramdisk
+ip=:::255.255.255.0:nomadik:: console=ttyAMA1 mac= init=linuxrc"
+
+for example:-
+"set bootargs root=/dev/nfs nfsroot=10.199.3.88:/local_no_backup/target
+ip=10.199.32.165:10.199.3.88:10.199.32.254:255.255.255.0:NDK10_165::
+mac=00:0D:88:45:5D:A5 console=ttyAMA1,115200n8 init=linuxrc"
+
+6. And then boot the kernel with command "bootm 0x100000"
+ (initrd address not needed since NFS)
+
+Start enjoying the advantages of root NFS
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/debug_strategy.txt
@@ -0,0 +1,66 @@
+
+ * 1.1 Nomadik Development Debugging Strategy
+ * ==========================================
+ *
+ * DEBUGGING LEVELS
+ * 0 To disable all debug messages
+ * 1 To enable normal debug macro- nmdk_dbg
+ * 2 To enable flow trace debug macro- nmdk_dbg_ftrace
+ * 4 To enable interrupt and timer debug macroc- nmdk_dbg2
+ * 8 To enable any special debug messages defined by macro- nmdk_dbg3
+ *
+ *
+ * 1.2 How to use Debuggign strategy in driver development ?
+ * =========================================================
+ *
+ * 1. include debug-nomadik.h file in c code
+ * (path: include/asm-arm/arch/nomadik/debug-nomadik.h)
+ * 2. define NMDK_DEBUG to required debug level (this can be automated
+ * to pass build time debug levels -as done for keypad driver.
+ * See driver/input/keypad makefile)
+ * 3. define NMDK_DEBUG_PFX to a small string to identify debug message
+ * This is an optional setting, if you don't define NMDK_DEBUG_PFX,
+ * by default "Nomadik" will be selected.
+ * 4. define NMDK_DBG to desired Kerlen debug level
+ * This is an optional setting, if you don't define NMDK_DBG,
+ * by default KERN_DEBUG will be used
+ * This generally need to set to KERN_ERR to force debug messages to
+ * appear on the console
+ *
+ *
+ * 1.3 How to activate debug messages?
+ *====================================
+ *
+ * Debug messages can be activated during build time by passing desired
+ * debug level either hardcoding in source file or as a make parameter
+ *
+ * 1. Enabling Debug messages by passing additional parameter to make
+ * This is a recommended method of debug messages implimentation.
+ * this method give flexibility to enable/disable debug messages
+ * during build without modifying code
+ * (a) To enable this you need to updated driver make file with:-
+ * ex.
+ * ifdef _DEBUG
+ * CFLAGS += -_DEBUG=$(_DEBUG)
+ * endif
+ *
+ * (b) Same _DEBUG must be used to define NMDK_DEBUG as
+ * explained in (1.2.2)
+ * (c) Debug parameter must be passed to the make with desired debug
+ * level as explained in (1.1)
+ * ex. make _DEBUG=1
+ * (d) you can AND several debug levels togather to enable respective
+ * debug mesages
+ * (e) even you can pass additional parameters to enable debug messages
+ * of more than one module
+ * ex. make _DEBUG=1 _DEBUG=4 ...
+ *
+ * 2. Enabling Debug messages by hardcoding in source file
+ * This is simplest implimentation, just define NMDK_DEBUG to
+ * desired debug level and compile the code, the disadvantage of this
+ * method is, it does not offer flexibility and code with debug message
+ * may become part of your release if not taken care properly.
+ *
+ */
+
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/dma_user_guide.txt
@@ -0,0 +1,420 @@
+Filename: ./Documentation/arm/STM-Nomadik/dma_user_guide.txt
+Author: Prafulla Wadaskar (prafulla.wadaskar@st.com)
+Owner: STMicroelectronics
+Purpose:
+ This Users Guide explains DMA implimentation and its usage
+ for client drivers on Nomadik platforms
+=============================================================================
+
+This document is valid subject to assumption -
+1. valid kernel source code with Nomadik support is available
+2. you are familier with Kernal DMA interface
+ (References: ./Documentation/DMA-API.txt)
+
+DMA Configuration:
+===================
+By default Nomadik DMA driver is configured to link staticlly with kernel.
+This DMA driver provides low level interface to the kernel DMA interface.
+To use DMA APIs, client driver should only include
+
+Definations:
+============
+1. DMA Channel: The logical DMA channel can be used for a DMA transfer
+2. Pipe: the physical DMA chanel H/w that is used to a DMA transfer
+3. DMAC: Direct Memory Access Controller (Nomadik has two DMACs)
+
+Brief Architecture:
+===================
+DMA dirver is registered as amba device and will be probed only if
+matches peripharal ID, the SOC specific data/function iterface is provided
+through platfrom_data pointer to allign driver design in sync with multiboard
+strategy.
+There are two DMA controllers having 8 pipes each, there could be number of
+dma channels which will use any one available pipe for dma transfer at run time
+Kernel DMA interface defines and controls the interface, whereas the h/w
+specific APIs are mapped through methods provided by upper layer (i,e.
+arch/arm/kernel/dma.c). The configuration, usage and features provided by this
+driver is explained below.
+
+This Users guide explains-
+1. Support for Standard DMA APIs for Nomadik DMA usage
+2. Additional DMA APIs to facilitate effieient/flexible DMA usage
+3. DMA Channel configuration.
+ a) Mode of operation: Transfer type
+ b) Mode of operation: flow control
+ c) Mode of operation: Double Buffered Transfer
+ d) Mode of operation: Infinite DMA Transfer
+ e) Mode of operation: Infinite DMA Transfer
+ f) Mode of operation: Pipe reservation
+ g) Mode of operation: Channel Priority
+ h) Mode of operation: Queueing DMA transfer requests
+4. DMA Interrupt hanndling for callback functions.
+5. Scatter-gather Support
+6. /proc/dma interfce.
+7. HOWTO add new DMAable peripharal device support
+
+1. Support for Standard DMA APIs for Nomadik DMA usage
+======================================================
+Standard kernel DMA interface exports APIs out of which request_dma, enable_dma,
+disable_dma, free_dma, dma_channel_active, set_dma_sg, __set_dma_addr, set_dma_count,
+are supported for Nomadik DMA Usage.
+For any DMA transfer you need to follow a sequence-
+ a) request_dma : to request a DMA channel be to used for transfer,
+ in this request you need to pass configuration
+ b) request_irq : to register DMA callback function
+ c) __set_dma_srcaddr : to set src DMAble address (mapped to __set_dma_addr)
+ d) __set_dma_destaddr : to set dest DMAble address (mapped to set_dma_speed)
+ e) set_dma_count : to set transfer size in bytes
+ f) set_dma_mode : to set/ulter mode of operation (optional)
+ g) enable_dma : to start transfer
+ h) dma_channel_active : to know the status of scheduled transfer (optional)
+ i) disable dma : to stop transfer (optional)
+ j) free_irq : to free irq used for callback (optional)
+ k) free_dma : to free requested DMA channel
+
+2. Additional DMA APIs for effieient/flexible DMA usage
+=======================================================
+Following additional APIs are provided for effieient/flexible DMA usage
+ a) request_available_dma
+ : This is a wrapper over request_dma,
+ this API will search, allocate and return available
+ free DMA channel.
+ b) suspend_DMA : to pause currently active DMA transfer
+ c) resume_DMA : to resume previously paused DMA transfer
+
+3. DMA Channel Configureation:
+==============================
+Durring request_dma system call you need to pass a pointer of pre-filled DMA
+Channel configuration structure nmdk_dma_info defined in asm/arch/dma.h
+i.e.-
+struct nmdk_dma_info {
+ u32 mode; /* Mode of operation(xfer type/flow cntrl etc)*/
+ char *srcdevtype; /* source device type configuration*/
+ char *destdevtype; /* desitnation device type configuration*/
+ u32 config; /* User programmable dmadev configuration*/
+};
+
+Each DMA channle has source DMA device and a destination DMA device, a DMA
+channel is a hardware that connects two DMAable devices for data transfer.
+So to have a successfull DMA transfer you need to configure all these three.
+Below picture gives some idea about it-
+
+
+ --------------------
+ srcdevtype, src_addr | | destdevtype, dest_addr
+ def dmadev config | | default dmadev configuration
+ | |
+ (Src DMA periph)------>| DMA Channel |--------> (Dest DMA peripharal)
+ | |
+ --------------------
+ (mode of operation)
+ (User configuration)
+ (Xfer Size in bytes)
+
+DMAable devices and their default configurations are SOC specific and declared
+in arch/arm/mach-nomadik/_devices.c file (will be explained latter
+in this guide). Each DMAble device is identified by unique name, during
+configuration the src and dest dmadev names need to be specified.
+
+Transfer Size in bytes, src_addr and dest_addr not a part of configuration as
+they keeps changing and need to be provided before enable_dma request
+
+User programmable dmadev configuration: These are optional configuration on
+the top of default for the changable paramters (specially Brust size and
+transfer width). This will be exmpained latter in this guide
+
+for ex, to configure a dma chnnel for memory to MSP peripharal DMA transfer
+the sructure should be filled as-
+
+ struct nmdk_dma_info test_dma_config =
+ {
+ .mode = MEM_TO_MEM,
+ .srcdevtype = "mem",
+ .destdevtype = "msp0rx",
+ .config = NULL,
+ };
+
+Out of all configuration parameter "mode" is very important since it decides
+the mode of DMA channel operation, there are several features supported all
+are configurable through mode.
+
+ a) Mode of operation: Transfer type
+ there are four basic modes of operation those are
+ MEM_TO_MEM, MEM_TO_PERIPH, PERIPH_TO_MEM, PERIPH_TO_PERIPH
+ you should program any one as per you need.
+
+ for ex. dma_info.mode=MEM_TO_PERIPH;
+
+ b) Mode of operation: flow control
+ By default flow controller is DMA controller, if you want to program
+ flow controller as peripharal you can use the provided macros as
+
+ for ex. dma_info.mode=FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+ To mention the flow controller is DMA controller.
+
+ for ex. dma_info.mode=FLOW_CNTRL_PERIPH(MEM_TO_PERIPH);
+ To mention the flow controller is peripharal controller.
+
+ Flow controller device cannot be peripharal for MEM_TO_MEM transter
+
+ c) Mode of operation: Double Buffered Transfer
+ There are some peripharals like SAA(Smart Audio Accelerator) who
+ requires DMA transfers to be done in double buffer mode, in double
+ buffered mode of operation the current dma requested in divided in two,
+ equal sequential transfers before scheduling.
+
+ By default standard single buffered transfer mode is programmed,
+ to configure Double Buffered Transfer mode a macro DMA_DOUBLE_BUFFERED
+ should be ORed with other configuration parameters
+
+ for ex. dma_info.mode=DMA_DOUBLE_BUFFERED |
+ FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+
+ d) Mode of operation: Infinite DMA Transfer
+ If you want to establish DMA transafer between two DMAble devices
+ infinitely without CPUs intervention, this means once transfer is
+ scheduled, it will reschedule it self at completion automatically.
+
+ By default infinite DMA transfer is disabled,
+ to configure Infinite DMA Transfer mode a macro DMA_INFINITE_XFER
+ should be ORed with other configuration parameters
+
+ for ex. dma_info.mode=DMA_INFINITE_XFER |
+ FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+
+ In Infinite DMA transfer mode, you will never receive completion
+ interrupt and callback interrupt handler cannot be executed
+
+ e) Mode of operation: Pipe reservation
+ Reserving a pipe will dediate a pipe for a channel
+ By default pipe is not reserved at the time of configuration. when you
+ schedule a enable_dma request, system looks for the available pipe and
+ schedules a transfer on it. This adds more flexibility to system to
+ handle more channels on limited pipes. In case the all the pipes are
+ busy the request will be deffered,
+ if you want to avoid this behavior, i.e. whenever you request enable_dma
+ pipe must be available to execute it, then you can reserve a pipe during
+ configuration.
+
+ to reserve a pipe, a macro DMA_PIPE_RESERVED
+ should be ORed with other configuration parameters
+
+ for ex. dma_info.mode=DMA_PIPE_RESERVED |
+ FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+
+ g) Mode of operation: Channel Priority
+ At hardware level there are total 16 DMA pipes (i.e. 8 on each
+ DMAC) each having its priority (i.e. pipe 0 having highest and 7 with
+ lowest). but since the pipes are allocated dynamically you never know
+ which pipe will be assigned to which channel. To take care of this
+ issue driver has in-built channel priority policy manager
+
+ Priority DMAC0 PIPES DMAC1 PIPES Policy
+ -----------------------------------------------------
+ Highest | 0 | | 1 | HIGH
+ . | 2 | | 3 | (0->15)
+ . -----------------------------------------------------
+ . | 4 | | 5 | NORMAL
+ . | 6 | | 7 | (4->15)
+ . -----------------------------------------------------
+ . | 8 | | 9 | LOW
+ . | 10 | | 11 | (8->15)
+ . -----------------------------------------------------
+ . | 12 | | 13 | UNDEFINED (fm 15->0)
+ Lowest | 14 | | 15 | For MEM-To MEM Xfer (15->12)
+ -----------------------------------------------------
+
+ Channel priority setup during configuration tells additional
+ information to the driver that the channel under request has a
+ particular priority. And the pipe allocation policy of a driver
+ allocates a pipe accordingly for a transfer under schedule.
+
+ By default DMA_EXCH_PRIORITY_UNDEFINED is set for each channel, as
+ per policy the free and available pipe search will be started from
+ lowest to highest.
+ there are three other priorities HIGH, NORMAL and LOW which can be set
+ by ORing respective macro with other configuration parameters
+
+ for ex. dma_info.mode=DMA_EXCH_PRIORITY_HIGH |
+ FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+
+ Channel priority setup macros for configurations-
+ DMA_EXCH_PRIORITY_UNDEFINED
+ DMA_EXCH_PRIORITY_LOW
+ DMA_EXCH_PRIORITY_NORMAL
+ DMA_EXCH_PRIORITY_HIGH
+
+ h) Mode of operation: Queueing DMA transfer requests
+ In the standard kernel DMA interface channel queueing is not allowed
+ once enable_dma request is executed system discards all subsequent
+ enable_dma request untill DMA finishes first scheduled request.
+ Nomadik DMA driver provides you flexibility to enable and use this
+ feature if required. Enabling this feature will accept all subsequent
+ enable_dma requests and queue them in a pipe, as system finishes
+ current transfer, next pre-scheduled transfer in a queue will be
+ executed, thus all enable_dma requests can be processed.
+
+ This feature can be enabled by ORing a macro DMA_QUEUE_ENABLED with
+ other configuration parameters
+
+ for ex. dma_info.mode=DMA_QUEUE_ENABLED |
+ FLOW_CNTRL_DMA(MEM_TO_PERIPH);
+
+4. DMA Interrupt hanndling for callback functions.
+======================================================
+When you schedule a DMA transfer, there should be a mechanism by which you know
+the transfer is finished sucessfully. In Nomadik DMA transfer a terminal
+count interrupt will be generated at the end of sucessfull transfer which can
+be requested and processed like any other standard interrupt.
+
+There are S/w decoded IRQs associated with all DMA channels.
+the macro IRQNO_FOR_DMACH(dmach) is provided to find irq for a DMA channel and
+the macro DMACH_FOR_IRQNO(irq) can be used to find DMA channel for irq number
+
+The DMA callback functions can be invoked as interrupt handler and requested
+through standard system calls i.e request_irq and free_irq.
+
+It is recommented to use your own tasklets to do deffered processing
+since it may block other DMA interuppts being processed in time.
+
+Below system messages indicates that irqno 188 to 191 are DMA interrupts
+root@NDK10_A0:/home/prafulla/alsa# cat /proc/interrupts
+ CPU0
+ 4: 12077:PL02 - Nomadik Timer Tick
+ 10: 0 - rtc
+ 11: 0 - ssp
+ 17: 581:PL08 - uart-pl011
+ 19: 6:PL10 - msp
+ 20: 33 - i2c0
+ 21: 296 - i2c1
+ 22: 81:PL02 - NMDK_MMC (data)
+ 26: 1 - SAA0
+ 27: 0 - SAA1
+113: 0 - mmc_detect
+168: 19176:PL08 - eth0
+188: 46 dummy dmaclbk-sdmmc->mem
+189: 0 dummy
+190: 10462 dummy dmaclbk-msp0rx->mem
+191: 10437 dummy dmaclbk-mem->msp0tx
+Err: 0
+
+5. Scatter-gather Support
+======================================================
+The Nomadik DMA driver supprts scatter-gather transfer for MEM_TO_PERIPH and
+PERIPH_TO_MEM type of data transfer. to use scatter gather suport following
+sequence must be executed.
+ a) request_dma, request_irq
+ b) get the *sg and sg_len form the upper layers
+ c) execute dma_map_sg with above information
+ d) set peripharal DMA address (__set_dma_srcaddr / __set_dma_srcaddr)
+ e) set memory DMA address using set_dma_sg API with sg information
+ f) set_dma_count for transfer size
+ g) execute enable_dma
+ h) wait for transfer complete event through callback
+ i) unmap sg list using dma_unmap_sg
+ j) free_dma
+
+6. /proc/dma interfce.
+======================================================
+/proc/dma entry is created to show the information of allocated DMA resources
+executing cat /proc/dma will list the allocation of all used DMA channles
+
+for ex-
+root@NDK10_A0:/home/prafulla/alsa# cat /proc/dma
+ 0: DMACH: sdmmc->mem
+ 1: DMACH: mem->sdmmc
+ 2: DMACH: msp0rx->mem
+ 3: DMACH: mem->msp0tx
+
+7. HOWTO add new DMA peripharal device support
+======================================================
+As per multiboard strategy
+(ref : ./Documentation/arm/STM-Nomadik/HOWTO-add_newboard.txt)
+for each supported SOC there is an arch/arm/mach-nomadik/_devices.c
+In this file there is data structure "dmadev_default_config_tbl"
+Add a new entry for the table for new DMA peripharal device
+(refer Architecture.DMA Support Chapter fo SOC specification)
+
+for ex-
+ {.id = "sdmmc",
+ .config = ( DMA_AHB_M0 | DMA_ADR_NOINC | DMA_WIDTH_WORD |
+ DMA_BSIZE_8 | DMA_REQUEST_LINE(21) |
+ DMA_DEV_BSIZE_CONFIGURABLE | DMA_DEV_WIDTH_CONFIGURABLE |
+ DMA_DEV_DMAC1_CANBE_USED ),},
+
+ explaination:
+ id: This is the unique identification string will be used in
+ configuration as srcdevtype or destdevtype.
+ config: This should be ORed value of following selection
+ a) DMA_AHB_M0 : to select AHB master 0 for this device
+ or
+ DMA_AHB_M1 : to select AHB master 1 for this device
+
+ b) DMA_ADR_INC : to indicate DMA address is incremented after
+ each transfer (memory, buffer case)
+ or
+ DMA_ADR_NOINC : to indicate DMA address is not incremented
+ after each transfer (fifo case)
+
+ c) DMA_WIDTH_WORD : to select word(32bits) as transfer width
+ or
+ DMA_WIDTH_HALFWORD: to select halfword(16bits) as transfer width
+ or
+ DMA_WIDTH_BYTE : to select byte(8bits) as transfer width
+
+ d) DMA_BSIZE_1 : to indicate 1 byte makes one DMA brust
+ or
+ DMA_BSIZE_4 : to indicate 4 bytes makes one DMA brust
+ or
+ DMA_BSIZE_8 : to indicate 8 bytes makes one DMA brust
+ or
+ DMA_BSIZE_16 : to indicate 16 bytes makes one DMA brust
+ or
+ DMA_BSIZE_32 : to indicate 32 bytes makes one DMA brust
+ or
+ DMA_BSIZE_64 : to indicate 64 bytes makes one DMA brust
+ or
+ DMA_BSIZE_128 : to indicate 128 bytes makes one DMA brust
+ or
+ DMA_BSIZE_256 : to indicate 256 bytes makes one DMA brust
+
+ e) DMA_REQUEST_LINE(x) : program peripharal request line number
+ (x less than 32)
+
+ f) DMA_DEV_BSIZE_CONFIGURABLE: to indicate the burst size can be
+ probrammed by user
+ or
+ DMA_DEV_BSIZE_NOT_CONFIGURABLE: to indicate the burst size can
+ not be probrammed by user
+ g) DMA_DEV_DWIDTH_CONFIGURABLE: to indicate the transfer width can
+ be probrammed by user
+ or
+ DMA_DEV_DWIDTH_NOT_CONFIGURABLE: to indicate the transfer width
+ can not be probrammed by user
+
+ h) DMA_DEV_DMAC1_CANBE_USED: to indicate DMA controller1 can be
+ used for the transfer
+ or
+ DMA_DEV_DMAC0_CANBE_USED: to indicate DMA controller0 can be
+ used for the transfer
+ or
+ DMA_DEV_BOTH_DMACS_CANBE_USED: to indicate both DMA controllers
+ 0 and 1 can be used for the transfer
+
+8. System Limitations and Solutions:
+=====================================
+1. MAX_DMA_CHANNELS: This macro is defined (include/asm-arm/arch-nomadik/dma.h)
+ that defiens max no. of dma channels that can be used simultenously. if in
+ complex system scenario these channels are insuffienent, you may increase
+ this number as per your needs.
+2. MAX_DMA_LLIS: This macro is defined (include/asm-arm/arch-nomadik/dma.h)
+ that defiens max no. of LLIs used internally by dma driver. lli pool is
+ internally maitained by driver and aquired whenver there is a enable_dma
+ request and freed at each dma transfer completion. In a dynamic system
+ usage a run time message "unable to find free lli.. rechecking..." can be
+ observed, if such case you may increase the defined value for this macro,
+ Assiging very large value eats free DMAble memory.
+
+==============================================================================
+
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/faqs.txt
@@ -0,0 +1,53 @@
+Filename: ./Documentation/arm/STM-Nomadik/faqs.txt
+Author: Prafulla Wadaskar (prafulla.wadaskar@st.com)
+Owner: STMicroelectronics
+Purpose:
+ This documents describes frequesnty occuring problems and
+ their brief solutions while using Nomadik-BSP
+=============================================================================
+
+This document is valid subject to assumption -
+1. valid kernel source code with Nomadik support is available
+
+F.A.Qs
+======
+Q: I am not getting console on CLCD even though CLCD is enabled
+A: check your command line arguments, there should not be any console related
+ configuration, in this case by default console will be configured to CLCD.
+ In this case system will seek console input from standard input device.
+
+Q: NFS boot is giving messages "server not responding" very frequently
+A: This may be due to network congestion, try NFS boot using "tcp" option
+ (Ex. root=/dev/nfs nfsroot=:,tcp
+ ip=:::255.255.255.0:::
+ console=ttyAMA1 mem=64M init=linuxrc)
+
+Q. How to enable/Disable cursor on CLCD panel?
+A. Create a dummy node "mknod /dev/dummy c 4 0 ".
+ execute a command "echo -e "\033[?1c" > /dev/dummy" to disable the cursor
+ and "echo -e "\033[?0c" > /dev/dummy" to enable the cursor
+ You can also use the "setterm" program to control this and other aspects of
+ the console. "setterm -cursor off > /dev/tty0" will do what you want.
+ "man setterm" will give a vast list of stuff.
+ There is more here:
+ http://linux.bri.st.com/docs/manual/distribution/distribution_guide10.php
+
+Q. How to disable CLCD screen blanking
+A. Create a dummy node "mknod /dev/dummy c 4 0 ".
+ Execute a command "echo -e "\033[9;0]" > /dev/dummy", this will set
+ screen blanking interval to 0 and will not blank the screen at all.
+
+Q. Generally when the kernel is up and running, CLCD is active but after some
+ time screen gets blanked, How to unblank the already blanked CLCD screen ?
+A. Create a dummy node "mknod /dev/dummy c 4 0 ".
+ Execute a command "echo -e "\033[13]" > /dev/dummy", this will activate
+ CLCD screen.
+
+Q. How to enable L2 Cache for Nomadik SOCs
+A. Switch to kernel source path, execute "make menuconfig"
+ Enable option "Enable L2 Cache controller" at location "x -> System Type"
+ L2CC is not available on STn8810 SOC versions
+
+==============================================================================
+
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/gpio_user_guide.txt
@@ -0,0 +1,140 @@
+Filename: ./Documentation/arm/STM-Nomadik/gpio_user_guide.txt
+Author: Prafulla Wadaskar (prafulla.wadaskar@st.com)
+Owner: STMicroelectronics
+Purpose:
+ This Users Guide explains GPIO implimentation and its usage
+ from other drivers for Nomadik platforms
+=============================================================================
+
+This document is valid subject to assumption -
+1. valid kernel source code with Nomadik support is available
+
+GPIO Configuration:
+===================
+By default GPIO driver is configured to link staticlly with kernel becasue
+it is tightly coupled with irq.c. GPIO is necessary for Nomadik architecture
+
+Brief Architecture:
+GPIO dirver is registered as amba device and will be probed only if
+matches peripharal ID, the SOC specific data and function iterface is provided
+through platfrom_data pointer to allign driver code in sync with multiboard
+strategy.
+
+GPIO driver mainly provides two kinds of functionality
+1. GPIO Interrupt hanndling and control.
+2. Exported GPIO APIs
+ 2.1 Usage of GPIO pins/block for read write APIs
+ 2.2 Configuration for Alternate functions APIs
+
+1. GPIO Interrupt hanndling and control:-
+==============================================
+VIC generates a common interrupt for all 32 pins in a block, there are such
+three to four blocks in a SOC, Each GPIO interrupt can be considered as
+standard IRQ and can be processed through generic system call (please refer
+irq_usrguide.txt). Further GPIO interrupts are softdecoded hence canot be
+programmed as priority interrupts individually,
+
+2. Exported GPIO APIs
+=====================
+All exported GPIOs are protected against call before initialization. This
+means if the GPIO driver cannot be probled due to any reasons and you try to
+use GPIO exported APIs, and error will be returned.
+APIS nomadik_gpio_readpin and nomadik_gpio_readblock are not protected against
+interrupt configuration becasue reading a GPIO does not harm its usage from
+other context. Where as all other APIS are protected against interrupt
+cnfiguration. This means if the interrupt is already requested on a GPIO pin
+the same pin cannot be configured untill you free that interrupt.
+
+2.1 Usage of GPIO pins/block for read write APIs
+================================================
+ a) nomadik_gpio_setpinconfig:
+ Individual pin can be configured for desired operation.
+ for ex.
+ mmc_pin.dev_name = "test";
+ mmc_pin.mode = GPIO_MODE_SOFTWARE;
+ mmc_pin.direction = GPIO_DIR_OUTPUT;
+ mmc_pin.debounce = GPIO_DEBOUNCE_ENABLE;
+ mmc_pin.debounce_time = GPIO_DEBOUNCE_TIME_60_MICROSEC;
+ ret = nomadik_gpio_setpinconfig(GPIO_PIN_75, &mmc_pin);
+
+ The above code will configure GPIO_PIN_75 in GPIO mode used as output
+ pin, enabled debouncing logic and set debounce time to 60 miroseconds.
+ debounce logic will be enabled if supported by the SOC version.
+ dev_name is a client device name to which the GPIO will be allocated.
+
+ b) nomadik_gpio_resetpinconfig:
+ sets the particular pin to its reset state.
+
+ c) nomadik_gpio_writepin;
+ write HIGN or LOW value on specified pin
+
+ d) nomadik_gpio_readpin;
+ reads HIGN or LOW value from specified pin
+
+ e) nomadik_gpio_readblock;
+ write multiple bits on specifed group of GPIOs
+ ex.
+ err = nomadik_gpio_writeblock(GPIO_BLOCK_32_BITS_64_TO_95,
+ , 0x0000aa00, 0x0000fc00);
+
+ The above code writes HIGH on GPIO_PIN_74, LOW on GPIO_PIN_75,
+ HIGH on GPIO_PIN_76, LOW on GPIO_PIN_77, and HIGN on GPIO_PIN_78
+
+ f) nomadik_gpio_writeblock;
+ reads multiple bits on specifed group of GPIOs
+
+2.2 Configuration for Alternate functions APIs
+================================================
+ a) nomadik_gpio_altfuncenable:
+ Sets the group of GPIOs dedicated for spefic alternate mode of
+ operation.
+
+ for ex.
+ retval = nomadik_gpio_altfuncenable(GPIO_ALT_I2C_0, "I2C_0");
+
+ The above code configures GPIOs 62 abd 63 (in case of stn8810) for
+ altfun_A, the detailed information which pins to be configured in which
+ mode for specified gpio_alt_function value(GPIO_ALT_I2C_0) is decided by
+ the gpio_altfun_tbl[] declared in _devices.c. It has table entries
+ whcih controls altfun configuration.
+
+ for example entry in table
+ {.altfun = GPIO_ALT_I2C_0,.start = 62,.end = 63,.cont = 0,.type =
+ GPIO_ALTF_A,},
+ states that- for gpio_alt_function value GPIO_ALT_I2C_0, from gpio pins 62
+ to 63 needs to be configured for alternate function A. cont=0 specifies that
+ there are no further pins to be configured for GPIO_ALT_I2C_0.
+
+ example for cont=1
+ {.altfun = GPIO_ALT_MM_CARD,.start = 8,.end = 10,.cont = 1,.type =
+ GPIO_ALTF_A,},
+ {.altfun = GPIO_ALT_SD_CARD,.start = 82,.end = 87,.cont = 1,.type =
+ GPIO_ALTF_A,},
+ {.altfun = GPIO_ALT_MM_CARD,.start = 14,.end = 16,.cont = 0,.type =
+ GPIO_ALTF_A,},
+
+ In the above example cont=1 in first and second declaration states that there
+ are additional entries in sequence to configure pins (82 to 87) and (14 to 16)
+ in altfun A mode for the same gpio_alt_function value GPIO_ALT_MM_CARD
+
+ b) nomadik_gpio_altfuncdisable:
+ This API reconfigures the group of GPIOs dedicated for specific
+ alternate mode of operation in to GPIO mode.
+
+Secured GPIO Access:
+===================
+To prevent GPIO resources getting used/altered by unauthorised way, a method
+is provided to give secured control. When gpio is requested by setpinconfig,
+you need to specify dev_name, GPIO driver records the information that the
+particular pin is alloocated the client named "dev_name", while doing
+resetpinconfig the same dev_id must be passed.
+Simillarly the same should be followed while requesting enabling/disabling altfunction.
+When the GPIO is requested for interrupt, the specified devname will be
+configured as client name.
+
+/proc/gpio interface:
+====================
+/proc/gpio entry is created to show the information of allocated GPIO resources
+
+=======================================================================================
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/irq_usrguide.txt
@@ -0,0 +1,171 @@
+Filename: ./Documentation/arm/STM-Nomadik/irq_usrguide.txt
+Author: Prafulla Wadaskar (prafulla.wadaskar@st.com)
+Owner: STMicroelectronics
+Created: 9th June 2007
+
+Purpose:
+This Users Guide explains interrupts implimentation and its usage from other
+client drivers for Nomadik platforms
+
+This document is valid subject to assumption -
+1. valid kernel source code with Nomadik support is available
+
+Generic:
+========
+All the available interrupts can be used in through standard system calls
+To use nomadik interrupts, include ONLY in your code
+Interrupt numbers generic to all Nomadik cuts are defined in irqs.h
+Interrupt numbers specific to Nomadik cut is defined in _devices.h
+(refer HOWTO-add_newboard.txt for more information)
+
+IRQ Description:
+================
+for stn8810 chip:
+ IRQ0 to IRQ31 : IRQ lines provided by the VIC for different
+ on-chip peripharals.
+ IRQ32 to IRQ127 : IRQ lines for GPIO interrupts
+
+for stn8815 chip:
+ IRQ0 to IRQ63 : IRQ lines provided by the VIC for different
+ on-chip peripharals.
+ IRQ64 to IRQ191 : IRQ lines for GPIO interrupts
+
+Specific:
+========
+1. Vectored Interrupt Controller (VIC) Interrupt Priority configuration:-
+========================================================================
+Generally whenever there is IRQ request to the VIC it will be processed
+immediately, if two or more IRQs active at a time then first in a sequence
+(i.e lower in number) will be processed first (this depends how you decode
+irqnr in entry-macro.S).
+
+Vectored interrupt processing hardware on Nomadik SOC is used to detect,
+process and service the interrupts in prioritized manner.
+This provides faster interrupt processing for comples decision.
+This adds more flexibility to the system and to the driver developers to
+take complex decision making about which interrupt to be proceesed first
+when more than one IRQ goes active at a time.
+
+also while processing priority interrupt all lower priority interrupts will
+be disabled by hardware whereas all higher priority interrupts will be active.
+This adds a benefit to use SA_IRQPRIORITY_x over SA_INTERRUPT becasue
+SA_INTERRUPT disables all interrupt while processign it.
+
+Any 15 (maximum) IRQs lines of VIC can be programmed for priority,
+GPIO_IRQs cannot be programmed for priority since the are softdecoded.
+
+How to program a interrupt for desired priority?
+================================================
+this can be done in two ways
+a. using request_irq
+ for ex.
+ err = request_irq(IRQ_UART1, test_inthandle, SA_IRQPRIORITY_4,
+ "test", test_data);
+
+ will request IRQ with interrupt priority level 4
+
+b) using set_irq_type
+ This call can be used any time after requesting a interrupt to
+ to enable/disable/change priority level for specific IRQ line
+
+ For ex.
+ set_irq_type(IRQ_UART1, SA_IRQPRIORITY_10);
+
+ will enable priority level for pre-requested IRQ
+ if IRQ was requested with different priority level earlier,
+ this call will change it to specified level
+
+How to disable interrupt priority for a IRQ?
+===========================================
+a) using set_irq_type api
+ This call can be used any time after requesting a interrupt to
+ to enable/disable/change priority level for specific IRQ line
+
+ For ex.
+ set_irq_type(IRQ_UART1, SA_IRQPRIORITY_DISABLE);
+
+ will disable priority level for pre-requested IRQ and will configure
+ if as normal IRQ
+
+How to know which IRQs are programmed for priority?
+===================================================
+executing cat /proc/interrupts interface will display all interrupt information
+if any IRQ is programmed with some priority then it will reflect as-
+
+# cat /proc/interrupts
+ CPU0
+ 4: 143193 Nomadik Timer Tick
+ 10: 0 rtc
+ 11: 0 ssp
+ 13: 1 dma1
+ 15: 0 dma0
+ 17: 745 uart-pl011
+ 20: 0 i2c0
+ 21: 4 i2c1
+ 22: 132 NMDK_MMC (data)
+ 30: 0:PL07 msp1
+ 31: 0 msp2
+ 72: 122 nmdk-kp
+ 77: 433 eth0
+ 79: 5175 nmdk-tp
+ 81: 32 mmc_detect
+Err: 0
+#
+
+Above message indicates that IRQ30 for msp1 is programmed as priority interrupt
+with level 7.
+
+2. GPIO Interrupt hanndling and control:-
+==============================================
+GPIO Interrupt control is handled through standard system calls. The macros
+(IRQNO_GPIO(x) and GPIO_PIN_FOR_IRQ(x)) are provided to find out interrupt
+number associated with GPIO and vice-versa.
+Following system calls are suported for GPIO interrupt control:-
+a) request_irq/ free_irq:
+ works in a standard way to request and free GPIO interrupt.
+ When request_irq is invoked for GPIO, it first configures GPIO pin
+ for input operation with debounce disable (if supported). Then it sets
+ interrupt type for falling edge detection by default if not specified
+ in interrupt_flags. You can set type of interrupt during request by
+ passing required SA_TTRIGGER_ flags. GPIO interrupt type will be set
+ during request_irq call if the requested interrupt is NOT shared.
+
+ for ex.
+ err = request_irq(IRQNO_GPIO(x), test_inthandle, SA_TRIGGER_RISING,
+ "test", test_data);
+
+ will request rising edge interrupt for GPIO x
+
+b) enable_irq/disable_irq:
+ These are standard system calls can be used to enable or disable GPIO
+ irqs whenever required.
+
+ for ex.
+ enable_irq(IRQNO_GPIO(x));
+
+ will enable interrupt for GPIO x
+
+c) set_irq_type:
+ By defult interrupt is requested as falling edge through request_irq call.
+ If you want to use other type of interrupt detection, this call can be used.
+ This call will be necessary to configure shared GPIO interrupt
+
+ For ex.
+ set_irq_type(IRQNO_GPIO(x), SA_TRIGGER_LOW);
+ sets irq type as low level detection
+
+ set_irq_type(IRQNO_GPIO(x), (SA_TRIGGER_RISING|SA_TRIGGER_FALLING);
+ sets irq type for both edges detection
+
+ Please note that set_irq_type overwites previous irq_type, hence the GPIO
+ interrupt behaviour depends upon where you call this API.
+
+ for ex. if you set_irq_type first and then requested interrupt, the
+ request_irq will overwrite the previously set irq type and vice versa.
+
+d) enable_irq_wake/disable_irq_wake:
+ the frame work is provided to handle these call for GPIO interrupt to
+ enable/disable wakup event generation to the power management unit.
+
+===============================================================================
+
--- /dev/null
+++ linux-2.6.20/Documentation/arm/STM-Nomadik/power_management.txt
@@ -0,0 +1,122 @@
+
+ * 1 Nomadik Power Management Strategy
+ * ==========================================
+ * Power in nomadik can be saved by following features
+ * 1. Enable idle tick suppression or dynamic tick
+ * 2. Frequency scaling
+ * 3. Voltage scaling
+ * 4. Take system into soft sleep
+ * 5. Take system into deep sleep
+ * 6. Taking individual device (eg. CLCD) into suspend state
+ *
+ *
+ * 1.1 How to Enable idle tick suppression or dynamic tick
+ * =========================================================
+ *
+ * 1. Select CONFIG_NO_IDLE_HZ in kernel features in kernel configuration
+ * 2. To enable dynamic tick
+ * echo -n 1 > /sys/devices/system/timer/timer0/dyn_tick
+ * 3. Dynamic tick can be disabled by
+ * echo -n 0 > /sys/devices/system/timer/timer0/dyn_tick
+ * 4. In idle thread, arm put itself in WFI, hence power is saved. By using
+ * dynamic tick we can put ARM in WFI for longer duration
+ *
+ * 1.2 Scaling frequencies
+ *====================================
+ * 1. Select CONFIG_CPU_FREQ & CONFIG_CPU_FREQ_NOMADIK in kernel configuration
+ * during compilation
+ * 2. Check current frequency (In Khz) by
+ * cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
+ * 3. Change system freq by
+ * echo -n /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
+ * If entered freq is not supported in system then next higher valid
+ * frequency is set
+ * 4. For frequencies which require voltage change, new voltage will be
+ * reflected. It can be checked by voltage sysfs file
+ * 5. If mapping for frequency and voltage is changed then change is required
+ * in arch/arm/mach-nomadik/power.c
+ * 6. If different SDRAM parameters are to be changed then change is required
+ * in arch/arm/mach-nomadik/power.c
+ * 7. If frequencies are to be altered then change is required in arch/arm/mach-nomadik/power.c
+ *
+ *
+ * 1.3 Scaling Voltage
+ *====================================
+ * 1. To enable voltage scaling either CONFIG_CPU_FREQ or CONFIG_PM_NOMADIK
+ * must be selected in configuration
+ * 2. Current voltage can be checked by
+ * cat /sys/nomadik/current_voltage
+ * VOLTAGE will be shown in milli volt
+ * 3. To change in current voltage without changing frequency use
+ * echo < voltage in milli volt > > current_voltage
+ * However directly changing voltage without frequency is not recommended
+ * but can be used for performance/testing purpose.
+ * 4. If voltages are to be altered then change is required in arch/arm/mach-nomadik/power.c
+ *
+ *
+ * 1.4 Taking system into soft sleep
+ *====================================
+ * 1. Select CONFIG_PM and CONFIG_NOMADIK_PM and CONFIG_NOMADIK_RTC
+ * 2. Change required sleep type to softsleep by
+ * echo -n softsleep > /sys/nomadik/sleep_type
+ * 3. To take system into sleep use
+ * echo -n mem > /sys/power/state
+ * 4. Wakeup can be done by RTC or keypad/touch panel/MMC
+ * 5. To specify rtc wakeup duration ( sleeping time )
+ echo -n >sleep_duration
+ Default sleep duratioon is 15 seconds
+ * 6. To take system directly into soft sleep without linux power management
+ * framework use
+ * echo 1 > /sys/nomadik/softsleep_enable
+ * This is to be used when we are sure that no driver is active i.e.
+ * driver need not be be suspended. This interface can save transition
+ * time but is not recommended. It can be used for testing purpose.
+ *
+ *
+ * 1.5 Taking system into deep sleep
+ *====================================
+ * 1. Select CONFIG_PM and CONFIG_NOMADIK_PM and CONFIG_NOMADIK_RTC
+ * 2. Change required sleep type to deepsleep by
+ * echo -n deepsleep > /sys/nomadik/sleep_type
+ * 3. To take system into sleep use
+ * echo -n mem > /sys/power/state
+ * 4. Wakeup can be done by RTC or keypad/touch panel/MMC
+ * 5. To specify rtc wakeup duration ( sleeping time )
+ * echo -n >sleep_duration
+ * Default sleep duration is 15 seconds
+ *
+ * 1.6 Taking Individual device into suspend/resume state
+ *=======================================================
+ * 1. Individual device can be taken into suspended state by writing into sysfs
+ * file. Similiarly device can be resumed back
+ * 2. For example to take CLCD into suspend state use
+ echo -n 2 > /sys/devices/mb:c0/power/state
+ * 3. For example to take CLCD into resumed state use
+ echo -n 0 > /sys/devices/mb:c0/power/state
+ * 4. Similar things can be done for other devices. Few devices such as RTC,
+ * GPIO should not be takne into suspend state by this interface.
+ *
+ *
+ * 1.7 Enabling/Disabling Individual devices(Keypad, Touchpanel, MMC) as wakeup devices
+ *===================================================================================
+ * 1. To enable a device (for e.g. keypad ) to be able to wakeup system from sleep do
+ * echo enabled > /sys/devices/platform/nmdk-kp.0/power/wakeup
+ * 2. To enable a device (for e.g. keypad ) to be able to wakeup system from sleep do
+ * echo disabled > /sys/devices/platform/nmdk-kp.0/power/wakeup
+ * If a device's wakeup state is disabled, it cannot be used for waking the
+ * system from sleep.
+ * 3. Above steps are applicable for any device that can wakeup the system
+ *
+ *
+ * 1.8 To add a device that can be used to wakeup
+ *================================================
+ * 1. To make a platform device to be able to wakeup a system, change is
+ * required in board specific file like arch/arm/mach-nomadik/ndk15_devices.c
+ * 2. To make a amba device to be able to wakeup a system, change is required
+ * in platform specific file like arch/arm/mach-nomadik/stn8815_devices.c
+ *
+ *
+ *
+ */
+
+
--- linux-2.6.20.orig/MAINTAINERS
+++ linux-2.6.20/MAINTAINERS
@@ -1939,10 +1939,19 @@ M: ebiederm@xmission.com
W: http://www.xmission.com/~ebiederm/files/kexec/
L: linux-kernel@vger.kernel.org
L: fastboot@osdl.org
S: Maintained
+KGDB
+P: Tom Rini
+P: Amit S. Kale
+M: trini@kernel.crashing.org
+M: amitkale@linsyssoft.com
+W: http://sourceforge.net/projects/kgdb
+L: kgdb-bugreport@lists.sourceforge.net
+S: Maintained
+
KPROBES
P: Prasanna S Panchamukhi
M: prasanna@in.ibm.com
P: Ananth N Mavinakayanahalli
M: ananth@in.ibm.com
--- linux-2.6.20.orig/Makefile
+++ linux-2.6.20/Makefile
@@ -10,11 +10,11 @@ NAME = Homicidal Dwarf Hamster
# Comments in this file are targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
# Do not:
# o use make's built-in rules and variables
-# (this increases performance and avoid hard-to-debug behavour);
+# (this increases performance and avoids hard-to-debug behaviour);
# o print "Entering directory ...";
MAKEFLAGS += -rR --no-print-directory
# We are using a recursive build, so we need to do a little thinking
# to get the ordering right.
@@ -319,11 +319,11 @@ AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
-export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
+export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
@@ -495,11 +495,11 @@ CFLAGS += -fno-omit-frame-pointer $(cal
else
CFLAGS += -fomit-frame-pointer
endif
ifdef CONFIG_DEBUG_INFO
-CFLAGS += -g
+CFLAGS += -gdwarf-2
endif
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector)
@@ -528,11 +528,10 @@ export INSTALL_PATH ?= /boot
#
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots. This is not defined in the
# makefile but the argument can be passed to make if needed.
#
-
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB
#
# INSTALL_MOD_STRIP, if defined, will cause modules to be
@@ -574,11 +573,11 @@ libs-y := $(libs-y1) $(libs-y2)
# Build vmlinux
# ---------------------------------------------------------------------------
# vmlinux is built from the objects selected by $(vmlinux-init) and
# $(vmlinux-main). Most are built-in.o files from top-level directories
-# in the kernel tree, others are specified in arch/$(ARCH)Makefile.
+# in the kernel tree, others are specified in arch/$(ARCH)/Makefile.
# Ordering when linking is important, and $(vmlinux-init) must be first.
#
# vmlinux
# ^
# |
@@ -732,18 +731,20 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
.tmp_map2: .tmp_map1
endif # ifdef CONFIG_KALLSYMS
+include $(srctree)/scripts/ksymhash/Makefile
# vmlinux image - including updated kernel symbols
vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
$(call if_changed_rule,vmlinux__)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
$(Q)rm -f .old_version
+ $(rule_ksymhash)
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
@@ -1480,11 +1481,16 @@ endif
clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
endif # skip-makefile
PHONY += FORCE
-FORCE:
+include/linux/dwarf2-defs.h: $(srctree)/include/linux/dwarf2.h $(srctree)/scripts/dwarfh.awk
+ mkdir -p include/linux/
+ awk -f $(srctree)/scripts/dwarfh.awk $(srctree)/include/linux/dwarf2.h > include/linux/dwarf2-defs.h
+
+FORCE: include/linux/dwarf2-defs.h
+
# Cancel implicit rules on top Makefile, `-rR' will apply to sub-makes.
Makefile: ;
# Declare the contents of the .PHONY variable as phony. We keep that
--- linux-2.6.20.orig/arch/arm/Kconfig
+++ linux-2.6.20/arch/arm/Kconfig
@@ -117,11 +117,11 @@ source "init/Kconfig"
menu "System Type"
choice
prompt "ARM system type"
- default ARCH_VERSATILE
+ default ARCH_NOMADIK
config ARCH_AAEC2000
bool "Agilent AAEC-2000 based"
select ARM_AMBA
help
@@ -201,10 +201,18 @@ config ARCH_NETX
bool "Hilscher NetX based"
select ARM_VIC
help
This enables support for systems based on the Hilscher NetX Soc
+config ARCH_NOMADIK
+ bool "Nomadik"
+ select ARM_AMBA
+ select ISA_DMA_API
+ select ICST525
+ help
+ Support for ARM's NOMADIK platform.
+
config ARCH_H720X
bool "Hynix HMS720x-based"
select ISA_DMA_API
help
This enables support for systems based on the Hynix HMS720x
@@ -379,10 +387,11 @@ source "arch/arm/mach-realview/Kconfig"
source "arch/arm/mach-at91rm9200/Kconfig"
source "arch/arm/mach-netx/Kconfig"
+source "arch/arm/mach-nomadik/Kconfig"
# Definitions to make life easier
config ARCH_ACORN
bool
config PLAT_IOP
@@ -738,11 +747,11 @@ config XIP_PHYS_ADDR
be linked for and stored to. This address is dependent on your
own flash usage.
endmenu
-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )
+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_NOMADIK )
menu "CPU Frequency scaling"
source "drivers/cpufreq/Kconfig"
@@ -774,10 +783,21 @@ config CPU_FREQ_IMX
help
This enables the CPUfreq driver for i.MX CPUs.
If in doubt, say N.
+config CPU_FREQ_NOMADIK
+ tristate "CPUfreq driver for ARM Nomadik CPUs"
+ depends on ARCH_NOMADIK && CPU_FREQ && NOMADIK_NDK15
+ default y
+ select NOMADIK_DMA
+ help
+ This enables the CPUfreq driver for ARM Nomadik CPUs.
+
+ For details, take a look at .
+
+ If in doubt, say Y.
endmenu
endif
menu "Floating point emulation"
@@ -908,10 +928,11 @@ if PCMCIA || ARCH_CLPS7500 || ARCH_IOP32
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \
|| ARCH_IXP23XX
source "drivers/ide/Kconfig"
endif
+
source "drivers/scsi/Kconfig"
source "drivers/ata/Kconfig"
source "drivers/md/Kconfig"
--- linux-2.6.20.orig/arch/arm/Makefile
+++ linux-2.6.20/arch/arm/Makefile
@@ -18,11 +18,11 @@ GZFLAGS :=-9
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
CFLAGS +=$(call cc-option,-marm,)
# Do not use arch/arm/defconfig - it's always outdated.
# Select a platform tht is kept up-to-date
-KBUILD_DEFCONFIG := versatile_defconfig
+KBUILD_DEFCONFIG := ndk15_defconfig
# defines filename extension depending memory manement type.
ifeq ($(CONFIG_MMU),)
MMUEXT := -nommu
endif
@@ -87,10 +87,11 @@ CHECKFLAGS += -D__arm__
#Default value
head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o
textofs-y := 0x00008000
+
machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_EBSA110) := ebsa110
machine-$(CONFIG_ARCH_CLPS7500) := clps7500
incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
machine-$(CONFIG_FOOTBRIDGE) := footbridge
@@ -104,10 +105,11 @@ ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
endif
machine-$(CONFIG_ARCH_PXA) := pxa
machine-$(CONFIG_ARCH_L7200) := l7200
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
+ machine-$(CONFIG_ARCH_NOMADIK) := nomadik
textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
machine-$(CONFIG_ARCH_CLPS711X) := clps711x
machine-$(CONFIG_ARCH_IOP32X) := iop32x
machine-$(CONFIG_ARCH_IOP33X) := iop33x
machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
@@ -198,16 +200,25 @@ ifneq ($(KBUILD_SRC),)
else
$(Q)ln -fsn $(INCDIR) include/asm-arm/arch
endif
@touch $@
-archprepare: maketools
+archprepare: maketools machprepare
-PHONY += maketools FORCE
+PHONY += maketools machprepare machclean machmrproper FORCE
maketools: include/linux/version.h include/asm-arm/.arch FORCE
$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
+
+# Machine specific preparation if it exists
+MACHPREPARE_PATH = $(strip `grep "machprepare:" $(MACHINE)Makefile* | grep -o $(MACHINE)`)
+
+machprepare:
+ifeq ($(wildcard $(TOPDIR)/.config), $(TOPDIR)/.config)
+ $(Q)set -e; for i in $(MACHPREPARE_PATH); do $(MAKE) -C $$i $@; done
+endif
+
# Convert bzImage to zImage
bzImage: zImage
zImage Image xipImage bootpImage uImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
@@ -216,12 +227,27 @@ zinstall install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
CLEAN_FILES += include/asm-arm/mach-types.h \
include/asm-arm/arch include/asm-arm/.arch
+# Machine specific mrproper operation if it exists
+MACHMRPROPER_PATH =`find arch/$(ARCH)/mach-*/ -name Makefile | xargs grep machmrproper: | sed 's/Makefile:machmrproper://g' | sed 's/Makefile://g'`
+
+machmrproper:
+ $(Q)set -e; for i in $(MACHMRPROPER_PATH); do $(MAKE) -C $$i $@; done
+
+# We use MRPROPER_FILES
+archmrproper: machmrproper
+
+# Machine specific clean operation
+MACHCLEAN_PATH = `find arch/$(ARCH)/mach-*/ -name Makefile | xargs grep machclean: | sed 's/Makefile:machclean://g' | sed 's/Makefile://g'`
+
+machclean:
+ $(Q)set -e; for i in $(MACHCLEAN_PATH); do $(MAKE) -C $$i $@; done
+
# We use MRPROPER_FILES and CLEAN_FILES now
-archclean:
+archclean: machclean
$(Q)$(MAKE) $(clean)=$(boot)
# My testing targets (bypasses dependencies)
bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
--- linux-2.6.20.orig/arch/arm/common/rtctime.c
+++ linux-2.6.20/arch/arm/common/rtctime.c
@@ -199,17 +199,17 @@ static int rtc_ioctl(struct inode *inode
ret = -EFAULT;
break;
}
alrm.enabled = 0;
alrm.pending = 0;
- alrm.time.tm_mday = -1;
+/* alrm.time.tm_mday = -1;
alrm.time.tm_mon = -1;
alrm.time.tm_year = -1;
alrm.time.tm_wday = -1;
alrm.time.tm_yday = -1;
alrm.time.tm_isdst = -1;
- ret = rtc_arm_set_alarm(ops, &alrm);
+*/ ret = rtc_arm_set_alarm(ops, &alrm);
break;
case RTC_RD_TIME:
ret = rtc_arm_read_time(ops, &tm);
if (ret)
--- /dev/null
+++ linux-2.6.20/arch/arm/configs/ndk10_defconfig
@@ -0,0 +1,1205 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Thu Aug 16 17:17:58 2007
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+CONFIG_ARCH_NOMADIK=y
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_NOMADIK_NDK10_CUT_A1=y
+# CONFIG_NOMADIK_NDK10_CUT_B06 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B0 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_03 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_05 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_06 is not set
+# CONFIG_NOMADIK_NDK15_REV3_C_02 is not set
+CONFIG_NOMADIK_TARGET="NDK10_Cut_A1"
+CONFIG_NOMADIK_SOC="stn8810"
+CONFIG_NOMADIK_PLATFORM="ndk10"
+CONFIG_NOMADIK_TARGET_EXTRA_CFLAGS="-D__RELEASE -D__STN_8810=10 -D__PLATFORM_MEVKFULL -D__UART_ELEMENTARY"
+CONFIG_NOMADIK_NDK10=y
+CONFIG_NOMADIK_NDK10_CUTA=y
+CONFIG_NOMADIK_GPIO=y
+CONFIG_GPIO_PROC=y
+CONFIG_NOMADIK_DMA=y
+CONFIG_NOMADIK_SSP=m
+CONFIG_NOMADIK_MSP=m
+CONFIG_NOMADIK_MTU=m
+CONFIG_NOMADIK_MTU_SYSTEM_TICK=y
+CONFIG_NOMADIK_RTC=y
+# CONFIG_NOMADIK_SVA_INIT_MEM is not set
+CONFIG_NOMADIK_SVA_MEM_SIZE=4
+# CONFIG_NOMADIK_SAA_INIT_MEM is not set
+# CONFIG_FB_NOMADIK_VGA is not set
+# CONFIG_FB_NOMADIK_CRT is not set
+CONFIG_FB_NOMADIK_QVGA_PORTRAIT=y
+# CONFIG_FB_NOMADIK_QVGA_LANDSCAPE is not set
+# CONFIG_FB_NOMADIK_PANEL_8BPP is not set
+CONFIG_FB_NOMADIK_PANEL_16BPP=y
+# CONFIG_FB_NOMADIK_PANEL_24BPP is not set
+CONFIG_SGA_INST_BUFFER_2=y
+# CONFIG_SGA_INST_BUFFER_20 is not set
+CONFIG_SGA_INST_BUFFER_NUM=2
+CONFIG_FB_NOMADIK_PANEL_BPP=16
+CONFIG_FB_NOMADIK_PANEL_NAME="QVGA_Portrait"
+CONFIG_FB_NOMADIK_PANEL_XRES=240
+CONFIG_FB_NOMADIK_PANEL_YRES=320
+CONFIG_FB_NOMADIK_PANEL_LFMARGIN=0x13
+CONFIG_FB_NOMADIK_PANEL_RTMARGIN=0x2f
+CONFIG_FB_NOMADIK_PANEL_UPRMARGIN=0x04
+CONFIG_FB_NOMADIK_PANEL_LWRMARGIN=0x0f
+CONFIG_FB_NOMADIK_PANEL_HSLEN=0x13
+CONFIG_FB_NOMADIK_PANEL_VSLEN=0x04
+CONFIG_FB_NOMADIK_PANEL_TIM2VAL=0x00ef1804
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+# CONFIG_CPU_ARM920T is not set
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_ARM1020 is not set
+# CONFIG_CPU_ARM1022 is not set
+# CONFIG_CPU_ARM1026 is not set
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_ICST525=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_ISA_DMA_API=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_NOMADIK=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_NOMADIK=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=46080
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_SMC91X=m
+# CONFIG_DM9000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYPAD_NOMADIK=m
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_TOUCHSCREEN_NOMADIK=m
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_AMBA_PL010 is not set
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_NOMADIK=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_NOMADIK_SPI=m
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_NOMADIK_ACODEC=m
+CONFIG_NOMADIK_STW5094=y
+# CONFIG_NOMADIK_STW5095 is not set
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_NOMADIK_ALSA=m
+# CONFIG_SND_ARMAACI is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=m
+# CONFIG_MMC_ARMMMCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+CONFIG_MMC_NOMADIK=m
+CONFIG_NOMADIK_MMC_DMA=y
+# CONFIG_NOMADIK_MMC_POLL is not set
+# CONFIG_NOMADIK_MMC_INTR is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="cp437"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_WANT_EXTRA_DEBUG_INFORMATION is not set
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
--- /dev/null
+++ linux-2.6.20/arch/arm/configs/ndk15_defconfig
@@ -0,0 +1,1221 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Thu Aug 16 16:12:48 2007
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+CONFIG_ARCH_NOMADIK=y
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_NOMADIK_NDK10_CUT_A1 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B06 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B0 is not set
+CONFIG_NOMADIK_NDK15_REV2_B_03=y
+# CONFIG_NOMADIK_NDK15_REV2_B_05 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_06 is not set
+# CONFIG_NOMADIK_NDK15_REV3_C_02 is not set
+CONFIG_NOMADIK_TARGET="NDK15_Rev2_B_03"
+CONFIG_NOMADIK_SOC="stn8815"
+CONFIG_NOMADIK_PLATFORM="ndk15"
+CONFIG_NOMADIK_TARGET_EXTRA_CFLAGS="-D__RELEASE -D__STN_8815=10"
+
+#
+# Nomadik chip used STn8815S22 cut A0 (marked STN8815AAS22)
+#
+
+#
+# Target board CPLD version 2.0.1.0
+#
+CONFIG_NOMADIK_CPLD_V2010=y
+CONFIG_NOMADIK_NDK15=y
+CONFIG_NOMADIK_NDK15_REV2_MMC=y
+CONFIG_NOMADIK_GPIO=y
+CONFIG_GPIO_PROC=y
+CONFIG_NOMADIK_DMA=y
+CONFIG_NOMADIK_SSP=m
+CONFIG_NOMADIK_MSP=m
+CONFIG_NOMADIK_MTU=m
+CONFIG_NOMADIK_MTU_SYSTEM_TICK=y
+CONFIG_NOMADIK_RTC=y
+CONFIG_NOMADIK_PM=y
+# CONFIG_NOMADIK_SVA_INIT_MEM is not set
+CONFIG_NOMADIK_SVA_MEM_SIZE=4
+# CONFIG_NOMADIK_SAA_INIT_MEM is not set
+CONFIG_FB_NOMADIK_VGA=y
+# CONFIG_FB_NOMADIK_CRT is not set
+# CONFIG_FB_NOMADIK_QVGA_PORTRAIT is not set
+# CONFIG_FB_NOMADIK_QVGA_LANDSCAPE is not set
+# CONFIG_FB_NOMADIK_PANEL_8BPP is not set
+CONFIG_FB_NOMADIK_PANEL_16BPP=y
+# CONFIG_FB_NOMADIK_PANEL_24BPP is not set
+CONFIG_SGA_INST_BUFFER_2=y
+# CONFIG_SGA_INST_BUFFER_20 is not set
+CONFIG_SGA_INST_BUFFER_NUM=2
+CONFIG_FB_NOMADIK_PANEL_BPP=16
+CONFIG_FB_NOMADIK_PANEL_NAME="VGA"
+CONFIG_FB_NOMADIK_PANEL_XRES=640
+CONFIG_FB_NOMADIK_PANEL_YRES=480
+CONFIG_FB_NOMADIK_PANEL_LFMARGIN=0x21
+CONFIG_FB_NOMADIK_PANEL_RTMARGIN=0x40
+CONFIG_FB_NOMADIK_PANEL_UPRMARGIN=0x07
+CONFIG_FB_NOMADIK_PANEL_LWRMARGIN=0x24
+CONFIG_FB_NOMADIK_PANEL_HSLEN=0x40
+CONFIG_FB_NOMADIK_PANEL_VSLEN=0x19
+CONFIG_FB_NOMADIK_PANEL_TIM2VAL=0x027f1800
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+# CONFIG_CPU_ARM920T is not set
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_ARM1020 is not set
+# CONFIG_CPU_ARM1022 is not set
+# CONFIG_CPU_ARM1026 is not set
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_ICST525=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_ISA_DMA_API=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_NOMADIK=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_NOMADIK=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_NOMADIK=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=46080
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYPAD_NOMADIK=m
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_TOUCHSCREEN_NOMADIK=m
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+# CONFIG_VT_CONSOLE is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_AMBA_PL010 is not set
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_NOMADIK=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+CONFIG_CPLD_I2C=y
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_NOMADIK_SPI=m
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_NOMADIK_ACODEC=m
+# CONFIG_NOMADIK_STW5094 is not set
+CONFIG_NOMADIK_STW5095=y
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_NOMADIK_ALSA=m
+# CONFIG_SND_ARMAACI is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=m
+# CONFIG_MMC_ARMMMCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+CONFIG_MMC_NOMADIK=m
+CONFIG_NOMADIK_MMC_DMA=y
+# CONFIG_NOMADIK_MMC_POLL is not set
+# CONFIG_NOMADIK_MMC_INTR is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="cp437"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_WANT_EXTRA_DEBUG_INFORMATION is not set
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
--- /dev/null
+++ linux-2.6.20/arch/arm/configs/ndk15b06_defconfig
@@ -0,0 +1,1221 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Thu Aug 16 17:22:36 2007
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+CONFIG_ARCH_NOMADIK=y
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_NOMADIK_NDK10_CUT_A1 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B06 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B0 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_03 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_05 is not set
+CONFIG_NOMADIK_NDK15_REV2_B_06=y
+# CONFIG_NOMADIK_NDK15_REV3_C_02 is not set
+CONFIG_NOMADIK_TARGET="NDK15_Rev2_B_06"
+CONFIG_NOMADIK_SOC="stn8815"
+CONFIG_NOMADIK_PLATFORM="ndk15"
+CONFIG_NOMADIK_TARGET_EXTRA_CFLAGS="-D__RELEASE -D__STN_8815=20 "
+CONFIG_NOMADIK_CPLD_V2010=y
+CONFIG_NOMADIK_NDK15=y
+
+#
+# Nomadik chip used STn8815S22 cut B0 (marked STN8815BBS22H11 Secure)
+#
+
+#
+# Target board CPLD version 2.0.1.0
+#
+CONFIG_NOMADIK_STN8815BBS22H11=y
+CONFIG_NOMADIK_GPIO=y
+CONFIG_GPIO_PROC=y
+CONFIG_NOMADIK_DMA=y
+CONFIG_NOMADIK_SSP=m
+CONFIG_NOMADIK_MSP=m
+CONFIG_NOMADIK_MTU=m
+CONFIG_NOMADIK_MTU_SYSTEM_TICK=y
+CONFIG_NOMADIK_RTC=y
+CONFIG_NOMADIK_PM=y
+# CONFIG_NOMADIK_SVA_INIT_MEM is not set
+CONFIG_NOMADIK_SVA_MEM_SIZE=4
+# CONFIG_NOMADIK_SAA_INIT_MEM is not set
+CONFIG_FB_NOMADIK_VGA=y
+# CONFIG_FB_NOMADIK_CRT is not set
+# CONFIG_FB_NOMADIK_QVGA_PORTRAIT is not set
+# CONFIG_FB_NOMADIK_QVGA_LANDSCAPE is not set
+# CONFIG_FB_NOMADIK_PANEL_8BPP is not set
+CONFIG_FB_NOMADIK_PANEL_16BPP=y
+# CONFIG_FB_NOMADIK_PANEL_24BPP is not set
+CONFIG_SGA_INST_BUFFER_2=y
+# CONFIG_SGA_INST_BUFFER_20 is not set
+CONFIG_SGA_INST_BUFFER_NUM=2
+CONFIG_FB_NOMADIK_PANEL_BPP=16
+CONFIG_FB_NOMADIK_PANEL_NAME="VGA"
+CONFIG_FB_NOMADIK_PANEL_XRES=640
+CONFIG_FB_NOMADIK_PANEL_YRES=480
+CONFIG_FB_NOMADIK_PANEL_LFMARGIN=0x21
+CONFIG_FB_NOMADIK_PANEL_RTMARGIN=0x40
+CONFIG_FB_NOMADIK_PANEL_UPRMARGIN=0x07
+CONFIG_FB_NOMADIK_PANEL_LWRMARGIN=0x24
+CONFIG_FB_NOMADIK_PANEL_HSLEN=0x40
+CONFIG_FB_NOMADIK_PANEL_VSLEN=0x19
+CONFIG_FB_NOMADIK_PANEL_TIM2VAL=0x027f1800
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+# CONFIG_CPU_ARM920T is not set
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_ARM1020 is not set
+# CONFIG_CPU_ARM1022 is not set
+# CONFIG_CPU_ARM1026 is not set
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_ICST525=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_ISA_DMA_API=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_NOMADIK=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_NOMADIK=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_NOMADIK=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=46080
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYPAD_NOMADIK=m
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_TOUCHSCREEN_NOMADIK=m
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+# CONFIG_VT_CONSOLE is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_AMBA_PL010 is not set
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_NOMADIK=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+CONFIG_CPLD_I2C=y
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_NOMADIK_SPI=m
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_NOMADIK_ACODEC=m
+# CONFIG_NOMADIK_STW5094 is not set
+CONFIG_NOMADIK_STW5095=y
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_NOMADIK_ALSA=m
+# CONFIG_SND_ARMAACI is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=m
+# CONFIG_MMC_ARMMMCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+CONFIG_MMC_NOMADIK=m
+CONFIG_NOMADIK_MMC_DMA=y
+# CONFIG_NOMADIK_MMC_POLL is not set
+# CONFIG_NOMADIK_MMC_INTR is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="cp437"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_WANT_EXTRA_DEBUG_INFORMATION is not set
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
--- /dev/null
+++ linux-2.6.20/arch/arm/configs/nhk15_defconfig
@@ -0,0 +1,1458 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.20
+# Fri Aug 22 11:48:56 2008
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+CONFIG_ARCH_NOMADIK=y
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_NOMADIK_NDK10_CUT_A1 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B06 is not set
+# CONFIG_NOMADIK_NDK10_CUT_B0 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_03 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_05 is not set
+# CONFIG_NOMADIK_NDK15_REV2_B_06 is not set
+# CONFIG_NOMADIK_NDK15_REV3_C_02 is not set
+CONFIG_NOMADIK_NHK15=y
+CONFIG_NOMADIK_TARGET="NHK15"
+CONFIG_NOMADIK_SOC="stn8815"
+CONFIG_NOMADIK_PLATFORM="nhk15"
+CONFIG_NOMADIK_TARGET_EXTRA_CFLAGS="-D__RELEASE -D__STN_8815=40 "
+CONFIG_NOMADIK_STN8815CAS22H11=y
+
+#
+# Nomadik chip used STn8815
+#
+CONFIG_NOMADIK_GPIO=y
+CONFIG_NOMADIK_ENABLE_L2CACHE=y
+CONFIG_GPIO_PROC=y
+CONFIG_NOMADIK_DMA=y
+CONFIG_NOMADIK_SSP=y
+CONFIG_NOMADIK_MSP=y
+CONFIG_NOMADIK_MTU=m
+CONFIG_NOMADIK_MTU_SYSTEM_TICK=y
+CONFIG_NOMADIK_RTC=y
+CONFIG_NOMADIK_PM=y
+CONFIG_NOMADIK_SVA_INIT_MEM=y
+CONFIG_FORCE_MAX_ZONEORDER=13
+CONFIG_NOMADIK_SVA_MEM_SIZE=18
+CONFIG_NOMADIK_SVA_VPIP=y
+# CONFIG_NOMADIK_SAA_INIT_MEM is not set
+# CONFIG_FB_NOMADIK_VGA is not set
+# CONFIG_FB_NOMADIK_CRT is not set
+# CONFIG_FB_NOMADIK_QVGA_PORTRAIT is not set
+# CONFIG_FB_NOMADIK_QVGA_LANDSCAPE is not set
+CONFIG_FB_NOMADIK_WVGA=y
+# CONFIG_FB_NOMADIK_PANEL_8BPP is not set
+# CONFIG_FB_NOMADIK_PANEL_16BPP is not set
+# CONFIG_FB_NOMADIK_PANEL_24BPP is not set
+CONFIG_FB_NOMADIK_PANEL_24BPP_PACKED=y
+CONFIG_FB_NOMADIK_ACCLN=y
+CONFIG_FB_NOMADIK_PANEL_BPP=24
+CONFIG_FB_NOMADIK_PANEL_NAME="WVGA"
+CONFIG_FB_NOMADIK_PANEL_XRES=800
+CONFIG_FB_NOMADIK_PANEL_YRES=480
+CONFIG_FB_NOMADIK_PANEL_LFMARGIN=0xD6
+CONFIG_FB_NOMADIK_PANEL_RTMARGIN=0x27
+CONFIG_FB_NOMADIK_PANEL_UPRMARGIN=0x22
+CONFIG_FB_NOMADIK_PANEL_LWRMARGIN=0xA
+CONFIG_FB_NOMADIK_PANEL_HSLEN=0x1
+CONFIG_FB_NOMADIK_PANEL_VSLEN=0x1
+CONFIG_FB_NOMADIK_PANEL_TIM2VAL=0x031f1822
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+# CONFIG_CPU_ARM920T is not set
+CONFIG_L2CACHE_ENABLE=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_ARM1020 is not set
+# CONFIG_CPU_ARM1022 is not set
+# CONFIG_CPU_ARM1026 is not set
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_ICST525=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_ISA_DMA_API=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc mem=64M"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_NOMADIK=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_NET_IPIP=y
+CONFIG_NET_IPGRE=y
+# CONFIG_NET_IPGRE_BROADCAST is not set
+CONFIG_IP_MROUTE=y
+# CONFIG_IP_PIMSM_V1 is not set
+# CONFIG_IP_PIMSM_V2 is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+CONFIG_BT_HCIVHCI=m
+# CONFIG_IEEE80211 is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_NOMADIK=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_NOMADIK=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_ONENAND=y
+# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
+CONFIG_MTD_ONENAND_GENERIC=y
+# CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=46080
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+# CONFIG_NET_WIRELESS_RTNETLINK is not set
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_HOSTAP is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYPAD_NOMADIK=y
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_NOMADIK is not set
+CONFIG_TOUCHSCREEN_NOMADIK_TS2003=y
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+# CONFIG_VT_CONSOLE is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_AMBA_PL010 is not set
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_NOMADIK=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_NOMADIK_SPI=y
+
+#
+# SPI Protocol Masters
+#
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+CONFIG_SENSORS_LIS3LV02DL=m
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+CONFIG_STMPE_NOMADIK=y
+CONFIG_SIF_NOMADIK=y
+CONFIG_ETM_NOMADIK=m
+# CONFIG_TIFM_CORE is not set
+CONFIG_BATT_NOMADIK=y
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=y
+# CONFIG_VIDEO_V4L1 is not set
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+
+#
+# Video Capture Adapters
+#
+
+#
+# Video Capture Adapters
+#
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+
+#
+# V4L USB devices
+#
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_NOMADIK=y
+
+#
+# Radio Adapters
+#
+# CONFIG_USB_DSBR is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# NOMADIK Audio Video Drivers(SAA and SVA)
+#
+CONFIG_NOMADIK_SAA=m
+CONFIG_NOMADIK_SVA=m
+CONFIG_NOMADIK_OGL=m
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_NOMADIK_ACODEC=y
+# CONFIG_NOMADIK_STW5094 is not set
+CONFIG_NOMADIK_STW5095=y
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_NOMADIK_ALSA=m
+CONFIG_SND_ARMAACI=y
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+#CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_BANDWIDTH=y
+CONFIG_USB_DYNAMIC_MINORS=y
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+#CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+CONFIG_USB_TEST=y
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+CONFIG_USB_GADGET_DUMMY_HCD=y
+CONFIG_USB_DUMMY_HCD=m
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_USB_INVENTRA_HCD=m
+CONFIG_USB_INVENTRA_HCD_HOST=y
+# CONFIG_USB_INVENTRA_HCD_GADGET_API is not set
+# CONFIG_USB_INVENTRA_HCD_OTG is not set
+# CONFIG_USB_INVENTRA_HCD_OTG_GSTORAGE is not set
+# CONFIG_USB_INVENTRA_STATIC_CONFIG is not set
+# CONFIG_USB_INVENTRA_DMA is not set
+# CONFIG_USB_INVENTRA_MUSB_HAS_AHB_ID is not set
+CONFIG_USB_INVENTRA_MUSB_HDR_CCNF_FILE=""
+CONFIG_USB_INVENTRA_MUSB_BOARD_FILE=""
+CONFIG_USB_INVENTRA_HCD_CUSTOM_OPTIONS=""
+# CONFIG_USB_INVENTRA_HCD_POLLING is not set
+CONFIG_USB_INVENTRA_HCD_LOGGING=0
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+CONFIG_FUSE_FS=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="cp437"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_YAFFS_FS=y
+CONFIG_YAFFS_YAFFS1=y
+# CONFIG_YAFFS_9BYTE_TAGS is not set
+# CONFIG_YAFFS_DOES_ECC is not set
+CONFIG_YAFFS_YAFFS2=y
+CONFIG_YAFFS_AUTO_YAFFS2=y
+# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
+# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
+# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
+CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_WANT_EXTRA_DEBUG_INFORMATION is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
--- linux-2.6.20.orig/arch/arm/kernel/Makefile
+++ linux-2.6.20/arch/arm/kernel/Makefile
@@ -17,10 +17,11 @@ obj-$(CONFIG_FIQ) += fiq.o
obj-$(CONFIG_MODULES) += armksyms.o module.o
obj-$(CONFIG_ARTHUR) += arthur.o
obj-$(CONFIG_ISA_DMA) += dma-isa.o
obj-$(CONFIG_PCI) += bios32.o isa.o
obj-$(CONFIG_SMP) += smp.o
+obj-$(CONFIG_KGDB) += kgdb.o kgdb-jmp.o
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
--- linux-2.6.20.orig/arch/arm/kernel/armksyms.c
+++ linux-2.6.20/arch/arm/kernel/armksyms.c
@@ -29,10 +29,17 @@ extern void __ashrdi3(void);
extern void __divsi3(void);
extern void __lshrdi3(void);
extern void __modsi3(void);
extern void __muldi3(void);
extern void __ucmpdi2(void);
+#ifdef CONFIG_AEABI
+extern void __aeabi_uldivmod(void);
+#else
+extern void __udivdi3(void);
+#endif
+extern void __umoddi3(void);
+extern void __udivmoddi4(void);
extern void __udivsi3(void);
extern void __umodsi3(void);
extern void __do_div64(void);
extern void __aeabi_idiv(void);
@@ -137,10 +144,17 @@ EXPORT_SYMBOL(__divsi3);
EXPORT_SYMBOL(__lshrdi3);
EXPORT_SYMBOL(__modsi3);
EXPORT_SYMBOL(__muldi3);
EXPORT_SYMBOL(__ucmpdi2);
EXPORT_SYMBOL(__udivsi3);
+#ifdef CONFIG_AEABI
+EXPORT_SYMBOL(__aeabi_uldivmod);
+#else
+EXPORT_SYMBOL(__udivdi3);
+#endif
+EXPORT_SYMBOL(__umoddi3);
+EXPORT_SYMBOL(__udivmoddi4);
EXPORT_SYMBOL(__umodsi3);
EXPORT_SYMBOL(__do_div64);
#ifdef CONFIG_AEABI
EXPORT_SYMBOL(__aeabi_idiv);
--- linux-2.6.20.orig/arch/arm/kernel/dma.c
+++ linux-2.6.20/arch/arm/kernel/dma.c
@@ -226,10 +226,11 @@ EXPORT_SYMBOL(disable_dma);
*/
int dma_channel_active(dmach_t channel)
{
return dma_chan[channel].active;
}
+EXPORT_SYMBOL(dma_channel_active);
void set_dma_page(dmach_t channel, char pagenr)
{
printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel);
}
--- linux-2.6.20.orig/arch/arm/kernel/entry-armv.S
+++ linux-2.6.20/arch/arm/kernel/entry-armv.S
@@ -13,10 +13,11 @@
*
* Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction that causes
* it to save wrong values... Be aware!
*/
+#include
#include
#include
#include
#include
#include
@@ -237,10 +238,11 @@ svc_preempt:
ldr r0, [tsk, #TI_FLAGS] @ get new tasks TI_FLAGS
tst r0, #_TIF_NEED_RESCHED
beq preempt_return @ go again
b 1b
#endif
+ CFI_END_FRAME(__irq_svc)
.align 5
__und_svc:
svc_entry
--- linux-2.6.20.orig/arch/arm/kernel/irq.c
+++ linux-2.6.20/arch/arm/kernel/irq.c
@@ -74,11 +74,23 @@ int show_interrupts(struct seq_file *p,
if (!action)
goto unlock;
seq_printf(p, "%3d: ", i);
for_each_present_cpu(cpu)
+#ifdef CONFIG_ARCH_NOMADIK
+ /*
+ * Outputs Priority Level for irq, if programmed
+ * refer: ./Documentation/arm/STM-Nomadik/irq_usrguide.txt
+ */
+ if (action->flags & SA_IRQPRIORITY_MASK)
+ seq_printf(p, "%10u:PL%02d", kstat_cpu(cpu).irqs[i],
+ (int)(action->flags)>>4 & 0x0f);
+ else
seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
+#else
+ seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
+#endif
seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-");
seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name);
--- /dev/null
+++ linux-2.6.20/arch/arm/kernel/kgdb-jmp.S
@@ -0,0 +1,30 @@
+/*
+ * arch/arm/kernel/kgdb-jmp.S
+ *
+ * Trivial setjmp and longjmp procedures to support bus error recovery
+ * which may occur during kgdb memory read/write operations.
+ *
+ * Author: MontaVista Software, Inc.
+ * source@mvista.com
+ *
+ * 2002-2005 (c) MontaVista Software, Inc. This file is licensed under the
+ * terms of the GNU General Public License version 2. This program as licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+#include
+
+ENTRY (kgdb_fault_setjmp)
+ /* Save registers */
+ stmia r0, {r0-r14}
+ str lr,[r0, #60]
+ mrs r1,cpsr
+ str r1,[r0,#64]
+ ldr r1,[r0,#4]
+ mov r0, #0
+ mov pc,lr
+
+ENTRY (kgdb_fault_longjmp)
+ /* Restore registers */
+ mov r1,#1
+ str r1,[r0]
+ ldmia r0,{r0-pc}^
--- /dev/null
+++ linux-2.6.20/arch/arm/kernel/kgdb.c
@@ -0,0 +1,208 @@
+/*
+ * arch/arm/kernel/kgdb.c
+ *
+ * ARM KGDB support
+ *
+ * Copyright (c) 2002-2004 MontaVista Software, Inc
+ *
+ * Authors: George Davis
+ * Deepak Saxena
+ */
+//#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/* Make a local copy of the registers passed into the handler (bletch) */
+void regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
+{
+ int regno;
+
+ /* Initialize all to zero (??) */
+ for (regno = 0; regno < GDB_MAX_REGS; regno++)
+ gdb_regs[regno] = 0;
+
+ gdb_regs[_R0] = kernel_regs->ARM_r0;
+ gdb_regs[_R1] = kernel_regs->ARM_r1;
+ gdb_regs[_R2] = kernel_regs->ARM_r2;
+ gdb_regs[_R3] = kernel_regs->ARM_r3;
+ gdb_regs[_R4] = kernel_regs->ARM_r4;
+ gdb_regs[_R5] = kernel_regs->ARM_r5;
+ gdb_regs[_R6] = kernel_regs->ARM_r6;
+ gdb_regs[_R7] = kernel_regs->ARM_r7;
+ gdb_regs[_R8] = kernel_regs->ARM_r8;
+ gdb_regs[_R9] = kernel_regs->ARM_r9;
+ gdb_regs[_R10] = kernel_regs->ARM_r10;
+ gdb_regs[_FP] = kernel_regs->ARM_fp;
+ gdb_regs[_IP] = kernel_regs->ARM_ip;
+ gdb_regs[_SP] = kernel_regs->ARM_sp;
+ gdb_regs[_LR] = kernel_regs->ARM_lr;
+ gdb_regs[_PC] = kernel_regs->ARM_pc;
+ gdb_regs[_CPSR] = kernel_regs->ARM_cpsr;
+}
+
+/* Copy local gdb registers back to kgdb regs, for later copy to kernel */
+void gdb_regs_to_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
+{
+ kernel_regs->ARM_r0 = gdb_regs[_R0];
+ kernel_regs->ARM_r1 = gdb_regs[_R1];
+ kernel_regs->ARM_r2 = gdb_regs[_R2];
+ kernel_regs->ARM_r3 = gdb_regs[_R3];
+ kernel_regs->ARM_r4 = gdb_regs[_R4];
+ kernel_regs->ARM_r5 = gdb_regs[_R5];
+ kernel_regs->ARM_r6 = gdb_regs[_R6];
+ kernel_regs->ARM_r7 = gdb_regs[_R7];
+ kernel_regs->ARM_r8 = gdb_regs[_R8];
+ kernel_regs->ARM_r9 = gdb_regs[_R9];
+ kernel_regs->ARM_r10 = gdb_regs[_R10];
+ kernel_regs->ARM_fp = gdb_regs[_FP];
+ kernel_regs->ARM_ip = gdb_regs[_IP];
+ kernel_regs->ARM_sp = gdb_regs[_SP];
+ kernel_regs->ARM_lr = gdb_regs[_LR];
+ kernel_regs->ARM_pc = gdb_regs[_PC];
+ kernel_regs->ARM_cpsr = gdb_regs[GDB_MAX_REGS - 1];
+}
+
+static inline struct pt_regs *kgdb_get_user_regs(struct task_struct *task)
+{
+ return (struct pt_regs *)
+ ((unsigned long)task->thread_info + THREAD_SIZE -
+ 8 - sizeof(struct pt_regs));
+}
+
+void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs,
+ struct task_struct *task)
+{
+ int regno;
+ struct pt_regs *thread_regs;
+
+ /* Just making sure... */
+ if (task == NULL)
+ return;
+
+ /* Initialize to zero */
+ for (regno = 0; regno < GDB_MAX_REGS; regno++)
+ gdb_regs[regno] = 0;
+
+ /* Otherwise, we have only some registers from switch_to() */
+ thread_regs = kgdb_get_user_regs(task);
+ gdb_regs[_R0] = thread_regs->ARM_r0; /* Not really valid? */
+ gdb_regs[_R1] = thread_regs->ARM_r1; /* " " */
+ gdb_regs[_R2] = thread_regs->ARM_r2; /* " " */
+ gdb_regs[_R3] = thread_regs->ARM_r3; /* " " */
+ gdb_regs[_R4] = thread_regs->ARM_r4;
+ gdb_regs[_R5] = thread_regs->ARM_r5;
+ gdb_regs[_R6] = thread_regs->ARM_r6;
+ gdb_regs[_R7] = thread_regs->ARM_r7;
+ gdb_regs[_R8] = thread_regs->ARM_r8;
+ gdb_regs[_R9] = thread_regs->ARM_r9;
+ gdb_regs[_R10] = thread_regs->ARM_r10;
+ gdb_regs[_FP] = thread_regs->ARM_fp;
+ gdb_regs[_IP] = thread_regs->ARM_ip;
+ gdb_regs[_SP] = thread_regs->ARM_sp;
+ gdb_regs[_LR] = thread_regs->ARM_lr;
+ gdb_regs[_PC] = thread_regs->ARM_pc;
+ gdb_regs[_CPSR] = thread_regs->ARM_cpsr;
+}
+
+static int compiled_break;
+
+int kgdb_arch_handle_exception(int exception_vector, int signo,
+ int err_code, char *remcom_in_buffer,
+ char *remcom_out_buffer,
+ struct pt_regs *linux_regs)
+{
+ long addr;
+ char *ptr;
+
+ switch (remcom_in_buffer[0]) {
+ case 'c':
+ kgdb_contthread = NULL;
+
+ /*
+ * Try to read optional parameter, pc unchanged if no parm.
+ * If this was a compiled breakpoint, we need to move
+ * to the next instruction or we will just breakpoint
+ * over and over again.
+ */
+ ptr = &remcom_in_buffer[1];
+ if (kgdb_hex2long(&ptr, &addr)) {
+ linux_regs->ARM_pc = addr;
+ } else if (compiled_break == 1) {
+ linux_regs->ARM_pc += 4;
+ }
+
+ compiled_break = 0;
+
+ return 0;
+ }
+
+ return -1;
+}
+
+static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
+{
+ kgdb_handle_exception(1, SIGTRAP, 0, regs);
+
+ return 0;
+}
+
+static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
+{
+ compiled_break = 1;
+ kgdb_handle_exception(1, SIGTRAP, 0, regs);
+
+ return 0;
+}
+
+static struct undef_hook kgdb_brkpt_hook = {
+ .instr_mask = 0xffffffff,
+ .instr_val = KGDB_BREAKINST,
+ .fn = kgdb_brk_fn
+};
+
+static struct undef_hook kgdb_compiled_brkpt_hook = {
+ .instr_mask = 0xffffffff,
+ .instr_val = KGDB_COMPILED_BREAK,
+ .fn = kgdb_compiled_brk_fn
+};
+
+/*
+ * Register our undef instruction hooks with ARM undef core.
+ * We regsiter a hook specifically looking for the KGB break inst
+ * and we handle the normal undef case within the do_undefinstr
+ * handler.
+ */
+int kgdb_arch_init(void)
+{
+ register_undef_hook(&kgdb_brkpt_hook);
+ register_undef_hook(&kgdb_compiled_brkpt_hook);
+
+ return 0;
+}
+
+struct kgdb_arch arch_kgdb_ops = {
+#ifndef __ARMEB__
+ .gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
+#else
+ .gdb_bpt_instr = {0xe7, 0xff, 0xde, 0xfe}
+#endif
+};
--- linux-2.6.20.orig/arch/arm/kernel/setup.c
+++ linux-2.6.20/arch/arm/kernel/setup.c
@@ -827,10 +827,15 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &vga_con;
#elif defined(CONFIG_DUMMY_CONSOLE)
conswitchp = &dummy_con;
#endif
#endif
+
+#if defined(CONFIG_KGDB)
+ extern void __init early_trap_init(void);
+ early_trap_init();
+#endif
}
static int __init topology_init(void)
{
--- linux-2.6.20.orig/arch/arm/kernel/traps.c
+++ linux-2.6.20/arch/arm/kernel/traps.c
@@ -277,25 +277,29 @@ asmlinkage void do_undefinstr(struct pt_
{
unsigned int correction = thumb_mode(regs) ? 2 : 4;
unsigned int instr;
struct undef_hook *hook;
siginfo_t info;
+ mm_segment_t fs;
void __user *pc;
/*
* According to the ARM ARM, PC is 2 or 4 bytes ahead,
* depending whether we're in Thumb mode or not.
* Correct this offset.
*/
regs->ARM_pc -= correction;
+ fs = get_fs();
+ set_fs(KERNEL_DS);
pc = (void __user *)instruction_pointer(regs);
if (thumb_mode(regs)) {
get_user(instr, (u16 __user *)pc);
} else {
get_user(instr, (u32 __user *)pc);
}
+ set_fs(fs);
spin_lock_irq(&undef_lock);
list_for_each_entry(hook, &undef_hook, node) {
if ((instr & hook->instr_mask) == hook->instr_val &&
(regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) {
@@ -680,10 +684,17 @@ void abort(void)
}
EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
+#if defined(CONFIG_KGDB)
+ return;
+}
+
+void __init early_trap_init(void)
+{
+#endif
unsigned long vectors = CONFIG_VECTORS_BASE;
extern char __stubs_start[], __stubs_end[];
extern char __vectors_start[], __vectors_end[];
extern char __kuser_helper_start[], __kuser_helper_end[];
int kuser_sz = __kuser_helper_end - __kuser_helper_start;
--- linux-2.6.20.orig/arch/arm/lib/Makefile
+++ linux-2.6.20/arch/arm/lib/Makefile
@@ -11,11 +11,11 @@ lib-y := backtrace.o changebit.o csumip
strncpy_from_user.o strnlen_user.o \
strchr.o strrchr.o \
testchangebit.o testclearbit.o testsetbit.o \
ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
ucmpdi2.o lib1funcs.o div64.o sha1.o \
- io-readsb.o io-writesb.o io-readsl.o io-writesl.o
+ io-readsb.o io-writesb.o io-readsl.o io-writesl.o udivdi3.o \
mmu-y := clear_user.o copy_page.o getuser.o putuser.o
# the code in uaccess.S is not preemption safe and
# probably faster on ARMv3 only
--- /dev/null
+++ linux-2.6.20/arch/arm/lib/gcclib.h
@@ -0,0 +1,25 @@
+/* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */
+/* I Molton 29/07/01 */
+
+#define BITS_PER_UNIT 8
+#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+
+typedef unsigned int UQItype __attribute__ ((mode (QI)));
+typedef int SItype __attribute__ ((mode (SI)));
+typedef unsigned int USItype __attribute__ ((mode (SI)));
+typedef int DItype __attribute__ ((mode (DI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+typedef unsigned int UDItype __attribute__ ((mode (DI)));
+
+#ifdef __ARMEB__
+ struct DIstruct {SItype high, low;};
+#else
+ struct DIstruct {SItype low, high;};
+#endif
+
+typedef union
+{
+ struct DIstruct s;
+ DItype ll;
+} DIunion;
+
--- /dev/null
+++ linux-2.6.20/arch/arm/lib/longlong.h
@@ -0,0 +1,184 @@
+/* longlong.h -- based on code from gcc-2.95.3
+
+ definitions for mixed size 32/64 bit arithmetic.
+ Copyright (C) 1991, 92, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+
+ This definition file 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, or (at your option) any later version.
+
+ This definition file 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. */
+
+/* Borrowed from GCC 2.95.3, I Molton 29/07/01 */
+
+#ifndef SI_TYPE_SIZE
+#define SI_TYPE_SIZE 32
+#endif
+
+#define __BITS4 (SI_TYPE_SIZE / 4)
+#define __ll_B (1L << (SI_TYPE_SIZE / 2))
+#define __ll_lowpart(t) ((USItype) (t) % __ll_B)
+#define __ll_highpart(t) ((USItype) (t) / __ll_B)
+
+/* Define auxiliary asm macros.
+
+ 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand)
+ multiplies two USItype integers MULTIPLER and MULTIPLICAND,
+ and generates a two-part USItype product in HIGH_PROD and
+ LOW_PROD.
+
+ 2) __umulsidi3(a,b) multiplies two USItype integers A and B,
+ and returns a UDItype product. This is just a variant of umul_ppmm.
+
+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator) divides a two-word unsigned integer, composed by the
+ integers HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and
+ places the quotient in QUOTIENT and the remainder in REMAINDER.
+ HIGH_NUMERATOR must be less than DENOMINATOR for correct operation.
+ If, in addition, the most significant bit of DENOMINATOR must be 1,
+ then the pre-processor symbol UDIV_NEEDS_NORMALIZATION is defined to 1.
+
+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator). Like udiv_qrnnd but the numbers are signed. The
+ quotient is rounded towards 0.
+
+ 5) count_leading_zeros(count, x) counts the number of zero-bits from
+ the msb to the first non-zero bit. This is the number of steps X
+ needs to be shifted left to set the msb. Undefined for X == 0.
+
+ 6) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
+ high_addend_2, low_addend_2) adds two two-word unsigned integers,
+ composed by HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and
+ LOW_ADDEND_2 respectively. The result is placed in HIGH_SUM and
+ LOW_SUM. Overflow (i.e. carry out) is not stored anywhere, and is
+ lost.
+
+ 7) sub_ddmmss(high_difference, low_difference, high_minuend,
+ low_minuend, high_subtrahend, low_subtrahend) subtracts two
+ two-word unsigned integers, composed by HIGH_MINUEND_1 and
+ LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and LOW_SUBTRAHEND_2
+ respectively. The result is placed in HIGH_DIFFERENCE and
+ LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
+ and is lost.
+
+ If any of these macros are left undefined for a particular CPU,
+ C macros are used. */
+
+#if defined (__arm__)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds %1, %4, %5 \n\
+ adc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%r" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "%r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subs %1, %4, %5 \n\
+ sbc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "r" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)))
+#define umul_ppmm(xh, xl, a, b) \
+{register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm \n\
+ mov %2, %5, lsr #16 \n\
+ mov %0, %6, lsr #16 \n\
+ bic %3, %5, %2, lsl #16 \n\
+ bic %4, %6, %0, lsl #16 \n\
+ mul %1, %3, %4 \n\
+ mul %4, %2, %4 \n\
+ mul %3, %0, %3 \n\
+ mul %0, %2, %0 \n\
+ adds %3, %4, %3 \n\
+ addcs %0, %0, #65536 \n\
+ adds %1, %1, %3, lsl #16 \n\
+ adc %0, %0, %3, lsr #16" \
+ : "=&r" ((USItype) (xh)), \
+ "=r" ((USItype) (xl)), \
+ "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)));}
+#define UMUL_TIME 20
+#define UDIV_TIME 100
+#endif /* __arm__ */
+
+#define __umulsidi3(u, v) \
+ ({DIunion __w; \
+ umul_ppmm (__w.s.high, __w.s.low, u, v); \
+ __w.ll; })
+
+#define __udiv_qrnnd_c(q, r, n1, n0, d) \
+ do { \
+ USItype __d1, __d0, __q1, __q0; \
+ USItype __r1, __r0, __m; \
+ __d1 = __ll_highpart (d); \
+ __d0 = __ll_lowpart (d); \
+ \
+ __r1 = (n1) % __d1; \
+ __q1 = (n1) / __d1; \
+ __m = (USItype) __q1 * __d0; \
+ __r1 = __r1 * __ll_B | __ll_highpart (n0); \
+ if (__r1 < __m) \
+ { \
+ __q1--, __r1 += (d); \
+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
+ if (__r1 < __m) \
+ __q1--, __r1 += (d); \
+ } \
+ __r1 -= __m; \
+ \
+ __r0 = __r1 % __d1; \
+ __q0 = __r1 / __d1; \
+ __m = (USItype) __q0 * __d0; \
+ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \
+ if (__r0 < __m) \
+ { \
+ __q0--, __r0 += (d); \
+ if (__r0 >= (d)) \
+ if (__r0 < __m) \
+ __q0--, __r0 += (d); \
+ } \
+ __r0 -= __m; \
+ \
+ (q) = (USItype) __q1 * __ll_B | __q0; \
+ (r) = __r0; \
+ } while (0)
+
+#define UDIV_NEEDS_NORMALIZATION 1
+#define udiv_qrnnd __udiv_qrnnd_c
+
+extern const UQItype __clz_tab[];
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __xr = (x); \
+ USItype __a; \
+ \
+ if (SI_TYPE_SIZE <= 32) \
+ { \
+ __a = __xr < ((USItype)1<<2*__BITS4) \
+ ? (__xr < ((USItype)1<<__BITS4) ? 0 : __BITS4) \
+ : (__xr < ((USItype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \
+ } \
+ else \
+ { \
+ for (__a = SI_TYPE_SIZE - 8; __a > 0; __a -= 8) \
+ if (((__xr >> __a) & 0xff) != 0) \
+ break; \
+ } \
+ \
+ (count) = SI_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \
+ } while (0)
--- /dev/null
+++ linux-2.6.20/arch/arm/lib/udivdi3.c
@@ -0,0 +1,246 @@
+/* More subroutines needed by GCC output code on some machines. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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, or (at your option)
+any later version.
+
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* As a special exception, if you link this library with other files,
+ some of which are compiled with GCC, to produce an executable,
+ this library does not by itself cause the resulting executable
+ to be covered by the GNU General Public License.
+ This exception does not however invalidate any other reasons why
+ the executable file might be covered by the GNU General Public License.
+ */
+/* support functions required by the kernel. based on code from gcc-2.95.3 */
+/* I Molton 29/07/01 */
+
+#include "gcclib.h"
+#include "longlong.h"
+
+const UQItype __clz_tab[] =
+{
+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+};
+
+UDItype
+__udivmoddi4 (UDItype n, UDItype d, UDItype *rp)
+{
+ DIunion ww;
+ DIunion nn, dd;
+ DIunion rr;
+ USItype d0, d1, n0, n1, n2;
+ USItype q0, q1;
+ USItype b, bm;
+
+ nn.ll = n;
+ dd.ll = d;
+
+ d0 = dd.s.low;
+ d1 = dd.s.high;
+ n0 = nn.s.low;
+ n1 = nn.s.high;
+
+ if (d1 == 0)
+ {
+ if (d0 > n1)
+ {
+ /* 0q = nn / 0D */
+
+ count_leading_zeros (bm, d0);
+
+ if (bm != 0)
+ {
+ /* Normalize, i.e. make the most significant bit of the
+ denominator set. */
+
+ d0 = d0 << bm;
+ n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm));
+ n0 = n0 << bm;
+ }
+
+ udiv_qrnnd (q0, n0, n1, n0, d0);
+ q1 = 0;
+
+ /* Remainder in n0 >> bm. */
+ }
+ else
+ {
+ /* qq = NN / 0d */
+
+ if (d0 == 0)
+ d0 = 1 / d0; /* Divide intentionally by zero. */
+
+ count_leading_zeros (bm, d0);
+
+ if (bm == 0)
+ {
+ /* From (n1 >= d0) /\ (the most significant bit of d0 is set),
+ conclude (the most significant bit of n1 is set) /\ (the
+ leading quotient digit q1 = 1).
+
+ This special case is necessary, not an optimization.
+ (Shifts counts of SI_TYPE_SIZE are undefined.) */
+
+ n1 -= d0;
+ q1 = 1;
+ }
+ else
+ {
+ /* Normalize. */
+
+ b = SI_TYPE_SIZE - bm;
+
+ d0 = d0 << bm;
+ n2 = n1 >> b;
+ n1 = (n1 << bm) | (n0 >> b);
+ n0 = n0 << bm;
+
+ udiv_qrnnd (q1, n1, n2, n1, d0);
+ }
+
+ /* n1 != d0... */
+
+ udiv_qrnnd (q0, n0, n1, n0, d0);
+
+ /* Remainder in n0 >> bm. */
+ }
+
+ if (rp != 0)
+ {
+ rr.s.low = n0 >> bm;
+ rr.s.high = 0;
+ *rp = rr.ll;
+ }
+ }
+ else
+ {
+ if (d1 > n1)
+ {
+ /* 00 = nn / DD */
+
+ q0 = 0;
+ q1 = 0;
+
+ /* Remainder in n1n0. */
+ if (rp != 0)
+ {
+ rr.s.low = n0;
+ rr.s.high = n1;
+ *rp = rr.ll;
+ }
+ }
+ else
+ {
+ /* 0q = NN / dd */
+
+ count_leading_zeros (bm, d1);
+ if (bm == 0)
+ {
+ /* From (n1 >= d1) /\ (the most significant bit of d1 is set),
+ conclude (the most significant bit of n1 is set) /\ (the
+ quotient digit q0 = 0 or 1).
+
+ This special case is necessary, not an optimization. */
+
+ /* The condition on the next line takes advantage of that
+ n1 >= d1 (true due to program flow). */
+ if (n1 > d1 || n0 >= d0)
+ {
+ q0 = 1;
+ sub_ddmmss (n1, n0, n1, n0, d1, d0);
+ }
+ else
+ q0 = 0;
+
+ q1 = 0;
+
+ if (rp != 0)
+ {
+ rr.s.low = n0;
+ rr.s.high = n1;
+ *rp = rr.ll;
+ }
+ }
+ else
+ {
+ USItype m1, m0;
+ /* Normalize. */
+
+ b = SI_TYPE_SIZE - bm;
+
+ d1 = (d1 << bm) | (d0 >> b);
+ d0 = d0 << bm;
+ n2 = n1 >> b;
+ n1 = (n1 << bm) | (n0 >> b);
+ n0 = n0 << bm;
+
+ udiv_qrnnd (q0, n1, n2, n1, d1);
+ umul_ppmm (m1, m0, q0, d0);
+
+ if (m1 > n1 || (m1 == n1 && m0 > n0))
+ {
+ q0--;
+ sub_ddmmss (m1, m0, m1, m0, d1, d0);
+ }
+
+ q1 = 0;
+
+ /* Remainder in (n1n0 - m1m0) >> bm. */
+ if (rp != 0)
+ {
+ sub_ddmmss (n1, n0, n1, n0, m1, m0);
+ rr.s.low = (n1 << b) | (n0 >> bm);
+ rr.s.high = n1 >> bm;
+ *rp = rr.ll;
+ }
+ }
+ }
+ }
+
+ ww.s.low = q0;
+ ww.s.high = q1;
+ return ww.ll;
+}
+
+UDItype
+#ifdef CONFIG_AEABI
+__aeabi_uldivmod (UDItype n, UDItype d)
+#else
+__udivdi3 (UDItype n, UDItype d)
+#endif
+{
+ return __udivmoddi4 (n, d, (UDItype *) 0);
+}
+
+UDItype
+__umoddi3 (UDItype u, UDItype v)
+{
+ UDItype w;
+
+ (void) __udivmoddi4 (u ,v, &w);
+
+ return w;
+}
+
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/Kconfig-nomadik
@@ -0,0 +1,267 @@
+if ARCH_NOMADIK
+
+# The GPIO_PIN_23 is shared between MMC and MSP0.
+# by default this pin is used for MMC for NOMADIK_NDK15_REV2_B_03 target
+# to use this pin for MSP it should be configured 'n'
+config NOMADIK_NDK15_REV2_MMC
+ bool
+ default y if NOMADIK_NDK15_REV2_B_03
+
+config NOMADIK_NDK10_CUTA
+ bool
+ default y if NOMADIK_NDK10_CUT_A1
+
+config NOMADIK_NDK10_CUTB
+ bool
+ default y if (NOMADIK_NDK10_CUT_B0 || NOMADIK_NDK10_CUT_B06)
+
+config NOMADIK_GPIO
+ bool
+ default y
+
+config NOMADIK_ENABLE_L2CACHE
+ bool "Enable L2 Cache controller"
+ depends on (NOMADIK_NDK15 || NOMADIK_NHK15)
+ default y if NOMADIK_STN8815CAS22H11
+ select L2CACHE_ENABLE
+ help
+ Nomadik Chip version for this platfrom supports L2 Cache
+ by default it is enabled, if you want to check system
+ performanence without L2 Cache, then say no here
+
+config GPIO_PROC
+ bool
+ default y
+ depends on NOMADIK_GPIO
+
+config NOMADIK_DMA
+ tristate "NOMADIK DMA SUPPORT"
+ depends on ISA_DMA_API
+ default y
+ help
+ Nomadik DMA low level driver for standrd DMA interface
+
+config NOMADIK_SSP
+ tristate "NOMADIK SSP SUPPORT"
+ depends on (NOMADIK_DMA && NOMADIK_SPI)
+ default m
+ help
+ Depends on Nomadik DMA driver and SPI driver
+
+config NOMADIK_MSP
+ tristate "NOMADIK MSP SUPPORT"
+ depends on (NOMADIK_DMA && NOMADIK_SPI)
+ default m
+ help
+ Depends on Nomadik DMA driver and SPI driver
+
+config NOMADIK_MTU
+ tristate "NOMADIK MTU SUPPORT"
+ default m
+ help
+ The driver offers 8 MTU units tobe used.
+ In case of module only MTU1 unit will be
+ available with 4 timers:
+ MTU1_T0, MTU1_T1, MTU1_T2 & MTU1_T3
+
+config NOMADIK_MTU_SYSTEM_TICK
+ bool "NOMADIK MTU SYSTEM TICK SUPPORT"
+ depends on NOMADIK_MTU
+ help
+ This will prevent the system tick to be used through MTU.
+ default y
+
+config NOMADIK_RTC
+ bool "NOMADIK RTC/RTT SUPPORT"
+ default y
+ help
+ The driver offers RTC and RTT support.
+ The RTC can be used through /dev/rtc interface for real
+ time calculations, alarms, long delays if required
+ If unsure say Y here.
+
+config NOMADIK_PM
+ bool "NOMADIK POWER MANAGEMENT SUPPORT"
+ depends on ( (NOMADIK_NHK15 || NOMADIK_NDK15) && NOMADIK_RTC )
+ default y
+ select PM if NOMADIK_PM
+ help
+ Nomadik Power Management Driver
+
+config NOMADIK_SVA_INIT_MEM
+ bool "NOMADIK SVA MEMORY at initialisation"
+ default n
+ help
+ The driver uses physically contiguous memory allocated
+ at kernel initialisation time.
+ If unsure say N here.
+
+config FORCE_MAX_ZONEORDER
+ int "Maximum zone order"
+ default "13"
+ help
+ For use cases having large memory requirements choosing a
+ larger memory size is advised.
+
+config NOMADIK_SVA_MEM_SIZE
+ int "SVA initial memory size" if NOMADIK_SVA_INIT_MEM
+ default "4"
+ help
+ For use cases having large memory requirements choosing a
+ larger memory size is advised.
+
+config NOMADIK_SVA_VPIP
+ bool "NOMADIK SVA VPIP support"
+ default y
+ help
+ This enables the support for VPIP in SVA driver. This allows to
+ create IRP services in SVA to grab the images from sensor CCP0.
+ Warning: This disables Ethernet & MTD devices.
+
+config NOMADIK_SAA_INIT_MEM
+ bool "NOMADIK SAA MEMORY at initialisation"
+ default n
+ help
+ The SAA driver uses physically contiguous memory allocated
+ at kernel initialisation time.
+ If unsure say N here.
+
+#Configuration for default display setup
+choice
+ prompt "Default Display Type"
+ depends on FB
+ default FB_NOMADIK_QVGA_PORTRAIT
+
+config FB_NOMADIK_VGA
+ bool "CLCD VGA"
+
+config FB_NOMADIK_CRT
+ bool "CRT VGA"
+
+config FB_NOMADIK_QVGA_PORTRAIT
+ bool "CLCD QVGA Portrait"
+
+config FB_NOMADIK_QVGA_LANDSCAPE
+ bool "CLCD QVGA Landscape"
+
+config FB_NOMADIK_WVGA
+ bool "CLCD WVGA"
+endchoice
+
+choice
+ prompt "Default Display BPP"
+ depends on FB
+ default FB_NOMADIK_PANEL_24BPP_PACKED
+
+config FB_NOMADIK_PANEL_8BPP
+ bool "8 BPP"
+
+config FB_NOMADIK_PANEL_16BPP
+ bool "16 BPP"
+
+config FB_NOMADIK_PANEL_24BPP
+ bool "24 BPP"
+
+config FB_NOMADIK_PANEL_24BPP_PACKED
+ bool "24 BPP Packed"
+
+endchoice
+
+config FB_NOMADIK_ACCLN
+ bool "Nomadik Graphics Acceleration"
+ tristate
+ depends on FB
+ default y
+ help
+ enable hw accln for graphics on nomadik
+
+config FB_NOMADIK_PANEL_BPP
+ int
+ default 16 if !FB
+ default 8 if FB_NOMADIK_PANEL_8BPP
+ default 16 if FB_NOMADIK_PANEL_16BPP
+ default 24 if FB_NOMADIK_PANEL_24BPP_PACKED
+ default 32 if FB_NOMADIK_PANEL_24BPP
+
+config FB_NOMADIK_PANEL_NAME
+ string
+ default "VGA" if !FB
+ default "VGA" if FB_NOMADIK_VGA
+ default "CRT" if FB_NOMADIK_CRT
+ default "QVGA_Portrait" if FB_NOMADIK_QVGA_PORTRAIT
+ default "QVGA_Landscape" if FB_NOMADIK_QVGA_LANDSCAPE
+ default "WVGA" if FB_NOMADIK_WVGA
+
+config FB_NOMADIK_PANEL_XRES
+ int
+ default 800 if FB_NOMADIK_WVGA
+ default 640 if !FB
+ default 640 if ( FB_NOMADIK_VGA || FB_NOMADIK_CRT)
+ default 240 if FB_NOMADIK_QVGA_PORTRAIT
+ default 320 if FB_NOMADIK_QVGA_LANDSCAPE
+
+config FB_NOMADIK_PANEL_YRES
+ int
+ default 480 if !FB
+ default 480 if ( FB_NOMADIK_VGA || FB_NOMADIK_CRT || FB_NOMADIK_WVGA)
+ default 320 if FB_NOMADIK_QVGA_PORTRAIT
+ default 240 if FB_NOMADIK_QVGA_LANDSCAPE
+
+config FB_NOMADIK_PANEL_LFMARGIN
+ hex
+ default 0xD6 if FB_NOMADIK_WVGA
+ default 0x21 if !FB
+ default 0x21 if FB_NOMADIK_VGA
+ default 0x29 if FB_NOMADIK_CRT
+ default 0x13 if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_RTMARGIN
+ hex
+ default 0x27 if FB_NOMADIK_WVGA
+ default 0x40 if !FB
+ default 0x40 if FB_NOMADIK_VGA
+ default 0x09 if FB_NOMADIK_CRT
+ default 0x2f if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_UPRMARGIN
+ hex
+ default 0x22 if FB_NOMADIK_WVGA
+ default 0x07 if !FB
+ default 0x07 if FB_NOMADIK_VGA
+ default 0x19 if FB_NOMADIK_CRT
+ default 0x04 if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_LWRMARGIN
+ hex
+ default 0xA if FB_NOMADIK_WVGA
+ default 0x24 if !FB
+ default 0x24 if FB_NOMADIK_VGA
+ default 0x02 if FB_NOMADIK_CRT
+ default 0x0f if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_HSLEN
+ hex
+ default 0x1 if FB_NOMADIK_WVGA
+ default 0x40 if !FB
+ default 0x40 if FB_NOMADIK_VGA
+ default 0x61 if FB_NOMADIK_CRT
+ default 0x13 if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_VSLEN
+ hex
+ default 0x1 if FB_NOMADIK_WVGA
+ default 0x19 if !FB
+ default 0x19 if FB_NOMADIK_VGA
+ default 0x02 if FB_NOMADIK_CRT
+ default 0x04 if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+
+config FB_NOMADIK_PANEL_TIM2VAL
+ hex
+ default 0x031f1822 if FB_NOMADIK_WVGA
+ default 0x027f1800 if !FB
+ default 0x027f1800 if (FB_NOMADIK_VGA)
+ default 0x027f3800 if (FB_NOMADIK_CRT)
+ default 0x00ef1804 if (FB_NOMADIK_QVGA_PORTRAIT || FB_NOMADIK_QVGA_LANDSCAPE)
+#Configuration for default display setup ends here
+
+endif
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/Makefile
@@ -0,0 +1,166 @@
+#
+# Makefile for the linux kernel.
+#
+
+ifeq ($(wildcard $(TOPDIR)/.config), $(TOPDIR)/.config)
+include $(TOPDIR)/.config
+endif
+
+# Object file lists.
+
+TARGET_NAME = $(shell echo $(CONFIG_NOMADIK_TARGET))
+SOC_NAME = $(shell echo $(CONFIG_NOMADIK_SOC))
+PLATFORM_NAME = $(shell echo $(CONFIG_NOMADIK_PLATFORM))
+NMDK_EXTRA_CFLAGS = $(shell echo $(CONFIG_NOMADIK_TARGET_EXTRA_CFLAGS))
+
+EXTRA_CFLAGS-y := $(NMDK_EXTRA_CFLAGS)
+EXTRA_CFLAGS-$(CONFIG_NOMADIK_MTU) += -DCONFIG_MTU0
+CFLAGS += $(EXTRA_CFLAGS-y)
+
+# NMDKDBG_FLAGS maintainence for all Nomadik debuging strategy
+# Add new entry for new component to be supported here
+NMDKDBG_FLAGS :=
+
+ifdef VIC_DEBUG
+NMDKDBG_FLAGS += -DVIC_DEBUG=$(VIC_DEBUG)
+endif
+
+ifdef RTC_DEBUG
+NMDKDBG_FLAGS += -DRTC_DEBUG=$(RTC_DEBUG)
+endif
+
+ifdef GPIO_DEBUG
+NMDKDBG_FLAGS += -DGPIO_DEBUG=$(GPIO_DEBUG)
+endif
+
+ifdef DMA_DEBUG
+NMDKDBG_FLAGS += -DDMA_DEBUG=$(DMA_DEBUG)
+endif
+
+ifdef EPIO_DEBUG
+NMDKDBG_FLAGS += -DEPIO_DEBUG=$(EPIO_DEBUG)
+endif
+
+ifdef SPI_DEBUG
+NMDKDBG_FLAGS += -DSPI_DEBUG=$(SPI_DEBUG)
+endif
+
+ifdef SSP_DEBUG
+NMDKDBG_FLAGS += -DSSP_DEBUG=$(SSP_DEBUG)
+endif
+
+ifdef MSP_DEBUG
+NMDKDBG_FLAGS += -DMSP_DEBUG=$(MSP_DEBUG)
+endif
+
+ifdef KEYPAD_DEBUG
+NMDKDBG_FLAGS += -DKEYPAD_DEBUG=$(KEYPAD_DEBUG)
+endif
+
+ifdef TOUCHP_DEBUG
+NMDKDBG_FLAGS += -DTOUCHP_DEBUG=$(TOUCHP_DEBUG)
+endif
+
+ifdef POWER_DEBUG
+NMDKDBG_FLAGS += -DPOWER_DEBUG=$(POWER_DEBUG)
+endif
+
+ifdef PM_DEBUG
+NMDKDBG_FLAGS += -DPM_DEBUG=$(PM_DEBUG)
+endif
+
+ifdef CPUFREQ_DEBUG
+NMDKDBG_FLAGS += -DCPUFREQ_DEBUG=$(CPUFREQ_DEBUG)
+endif
+
+ifdef SLEEP_DEBUG
+NMDKDBG_FLAGS += -DSLEEP_DEBUG=$(SLEEP_DEBUG)
+endif
+
+ifdef SVA_DEBUG
+NMDKDBG_FLAGS += -DSVA_DEBUG=$(SVA_DEBUG)
+endif
+#export the nomadik debug flags for driver/* build
+CFLAGS += $(NMDKDBG_FLAGS)
+
+obj-y := gpio.o clock.o timer.o irq.o fsmc.o
+
+obj-y += $(SOC_NAME)_devices.o
+obj-y += $(PLATFORM_NAME)_devices.o
+
+# Soc Specific modules
+
+obj-$(CONFIG_NOMADIK_PM) += sleep.o deep_sleep.o soft_sleep.o normal.o slow.o pm.o
+
+ifeq ($(CONFIG_NOMADIK_PM),y)
+obj-y += power.o
+endif
+
+ifeq ($(CONFIG_L2CACHE_ENABLE),y)
+obj-y += l2cc.o
+endif
+ifeq ($(CONFIG_CPU_FREQ_NOMADIK),y)
+obj-y += power.o slow.o
+endif
+
+obj-$(CONFIG_CPU_FREQ_NOMADIK) += cpu.o dfs.o
+obj-$(CONFIG_NOMADIK_DMA) += nmdkmod_DMA.o
+obj-$(CONFIG_NOMADIK_SSP) += nmdkmod_ssp.o
+obj-$(CONFIG_NOMADIK_MSP) += nmdkmod_msp.o
+obj-$(CONFIG_NOMADIK_MTU) += nmdkmod_mtu.o
+obj-$(CONFIG_NOMADIK_RTC) += nmdkmod_rtc.o
+
+nmdkmod_gpio-objs := gpio.o
+nmdkmod_DMA-objs := dma.o
+nmdkmod_ssp-objs := ssp.o
+nmdkmod_msp-objs := msp.o
+nmdkmod_mtu-objs := mtu.o
+nmdkmod_rtc-objs := rtc.o
+
+# Auto board configuration/dependency resolution
+#include $(TOPDIR)/.config
+
+SOC_HEADER = include/asm-arm/arch-nomadik/soc_devices.h
+PDEV_HEADER = include/asm-arm/arch-nomadik/board_devices.h
+
+$(TOPDIR)/.platform:
+ $(Q)echo "Generating $@"
+ $(Q)echo $(CONFIG_NOMADIK_PLATFORM) > $@
+
+$(TOPDIR)/.soc:
+ $(Q)echo "Generating $@"
+ $(Q)echo $(CONFIG_NOMADIK_SOC) > $@
+
+$(TOPDIR)/.target:
+ $(Q)echo "Generating $@"
+ $(Q)echo $(CONFIG_NOMADIK_TARGET) > $@
+
+$(TOPDIR)/$(PDEV_HEADER):
+ $(Q)echo "Generating SYMLINK $(PDEV_HEADER) -> $(PLATFORM_NAME)_devices.h"
+ $(Q)rm -rf $@
+ $(Q)ln -s $(PLATFORM_NAME)_devices.h $@
+
+$(TOPDIR)/$(SOC_HEADER):
+ $(Q)echo "Generating SYMLINK $(SOC_HEADER) -> $(SOC_NAME)_devices.h"
+ $(Q)rm -rf $@
+ $(Q)ln -s $(SOC_NAME)_devices.h $@
+
+# machprepare kjhsdk dfsdf
+machprepare: $(TOPDIR)/.platform $(TOPDIR)/.soc $(TOPDIR)/.target $(TOPDIR)/$(PDEV_HEADER) $(TOPDIR)/$(SOC_HEADER)
+
+# machprepare kjhsdk j
+machclean:
+ $(Q)rm -rf *mod.o *.mod.c *.o *.ko
+
+machmrproper:
+ $(Q)rm -rf $(TOPDIR)/$(SOC_HEADER) $(TOPDIR)/$(PDEV_HEADER) $(TOPDIR)/arch/arm/mach-nomadik/Kconfig $(TOPDIR)/.soc $(TOPDIR)/.target $(TOPDIR)/.platform
+
+#This will resolve any machin specific dependency for configuration
+#This will generate Kconfig file if not present
+machconfig:
+ifneq ($(wildcard $(TOPDIR)/arch/arm/mach-nomadik/Kconfig), $(TOPDIR)/arch/arm/mach-nomadik/Kconfig)
+ @echo "Generating $(TOPDIR)/arch/arm/mach-nomadik/Kconfig"
+ @./create_kconfig.pl $(TOPDIR)/arch/arm/mach-nomadik
+endif
+
+# end of Auto board configuration/dependency resolution
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/Makefile.boot
@@ -0,0 +1,4 @@
+ zreladdr-y := 0x00008000
+params_phys-y := 0x00000100
+initrd_phys-y := 0x00800000
+
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/clock.c
@@ -0,0 +1,127 @@
+/*
+ * linux/arch/arm/mach-nomadik/clock.c
+ *
+ * Copyright (C) 2004 ARM Limited.
+ * Written by Deep Blue Solutions Limited.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include "clock.h"
+
+static LIST_HEAD(clocks);
+static DEFINE_MUTEX(clocks_mutex);
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+ struct clk *p, *clk = ERR_PTR(-ENOENT);
+
+ mutex_lock(&clocks_mutex);
+ list_for_each_entry(p, &clocks, node) {
+ if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
+ clk = p;
+ break;
+ }
+ }
+ mutex_unlock(&clocks_mutex);
+
+ return clk;
+}
+
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+ module_put(clk->owner);
+}
+
+EXPORT_SYMBOL(clk_put);
+
+int clk_enable(struct clk *clk)
+{
+ return 0;
+}
+
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+
+EXPORT_SYMBOL(clk_disable);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+ return clk->rate;
+}
+
+EXPORT_SYMBOL(clk_get_rate);
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+ return 0;
+}
+
+EXPORT_SYMBOL(clk_round_rate);
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+ clk->rate = rate;
+ return 0;
+}
+
+EXPORT_SYMBOL(clk_set_rate);
+
+/*
+ * These are fixed clocks.
+ */
+
+static struct clk uart_clk = {
+ .name = "UARTCLK",
+ .rate = 48000000,
+};
+
+static struct clk clcd_clk = {
+ .name = "CLCDCLK",
+ .rate = 48000000,
+};
+
+int clk_register(struct clk *clk)
+{
+ mutex_lock(&clocks_mutex);
+ list_add(&clk->node, &clocks);
+ mutex_unlock(&clocks_mutex);
+ return 0;
+}
+
+EXPORT_SYMBOL(clk_register);
+
+void clk_unregister(struct clk *clk)
+{
+ mutex_lock(&clocks_mutex);
+ list_del(&clk->node);
+ mutex_unlock(&clocks_mutex);
+}
+
+EXPORT_SYMBOL(clk_unregister);
+
+static int __init clk_init(void)
+{
+ clk_register(&uart_clk);
+ clk_register(&clcd_clk);
+ return 0;
+}
+
+arch_initcall(clk_init);
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/clock.h
@@ -0,0 +1,25 @@
+/*
+ * linux/arch/arm/mach-nomadik/clock.h
+ *
+ * Copyright (C) 2004 ARM Limited.
+ * Written by Deep Blue Solutions Limited.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+struct module;
+struct icst525_params;
+
+struct clk {
+ struct list_head node;
+ unsigned long rate;
+ struct module *owner;
+ const char *name;
+ const struct icst525_params *params;
+ void *data;
+ void (*setvco)(struct clk *, struct icst525_vco vco);
+};
+
+int clk_register(struct clk *clk);
+void clk_unregister(struct clk *clk);
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/cpu.c
@@ -0,0 +1,293 @@
+/*
+ * linux/arch/arm/mach-nomadik/cpu.c
+ *
+ * Copyright (C) STMicroelectronics
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * CPU freq driver
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#define CPUFREQ_NAME "CPUFREQ"
+
+#ifndef CPUFREQ_DEBUG
+#define CPUFREQ_DEBUG 0
+#endif
+
+#define NMDK_DEBUG CPUFREQ_DEBUG /* enables/disables nmdk_dbg msgs */
+#define NMDK_DEBUG_PFX CPUFREQ_NAME /* msg header represents this module */
+#define NMDK_DBG KERN_ERR /* message level */
+
+
+#define PLL1_CRYSTAL_FREQ_KHZ (192 * 100)
+#define CALC_FREQ(pll1_nmul, pll1_pdiv) (PLL1_CRYSTAL_FREQ_KHZ * (pll1_nmul + 2)) / (1 << pll1_pdiv);
+
+static struct cpufreq_driver nomadik_driver;
+static unsigned int nomadik_get(unsigned int cpu);
+
+extern unsigned int nomadik_freq_to_idx(unsigned int freq);
+extern unsigned int nomadik_idx_to_freq(unsigned int idx);
+extern u32 nomadik_setsys_freq(u32 freq_idx);
+
+/*
+ * Validate the speed policy.
+ */
+static int nomadik_verify_policy(struct cpufreq_policy *policy)
+{
+
+ nmdk_dbg_ftrace();
+ cpufreq_verify_within_limits(policy,
+ policy->cpuinfo.min_freq,
+ policy->cpuinfo.max_freq);
+
+ policy->min = NOMADIK_CPUFREQ_MIN;
+ policy->max = NOMADIK_CPUFREQ_MAX;
+
+ cpufreq_verify_within_limits(policy,
+ policy->cpuinfo.min_freq,
+ policy->cpuinfo.max_freq);
+
+ return 0;
+}
+
+static int nomadik_set_target(struct cpufreq_policy *policy,
+ unsigned int target_freq, unsigned int relation)
+{
+ cpumask_t cpus_allowed;
+ int cpu = policy->cpu;
+ struct cpufreq_freqs freqs;
+ unsigned int freq_idx;
+ unsigned int new_voltage, cur_voltage;
+ unsigned char vcore_data;
+ int result;
+
+ nmdk_dbg2("%s called with target_freq = %d relation = %d\n",
+ (__FUNCTION__), target_freq, relation);
+ /*
+ * Save this threads cpus_allowed mask.
+ */
+ cpus_allowed = current->cpus_allowed;
+
+ /*
+ * Bind to the specified CPU. When this call returns,
+ * we should be running on the right CPU.
+ */
+ set_cpus_allowed(current, cpumask_of_cpu(cpu));
+ BUG_ON(cpu != smp_processor_id());
+
+ freqs.old = nomadik_get(policy->cpu);
+
+ freq_idx = nomadik_freq_to_idx(target_freq);
+
+ switch (relation) {
+ case CPUFREQ_RELATION_L:
+ if (nomadik_idx_to_freq(freq_idx) > policy->max)
+ freq_idx--;
+ break;
+ case CPUFREQ_RELATION_H:
+ if ((nomadik_idx_to_freq(freq_idx) > target_freq) &&
+ (nomadik_idx_to_freq(freq_idx - 1) >= policy->min))
+ freq_idx--;
+ break;
+ }
+
+ freqs.new = nomadik_idx_to_freq(freq_idx);
+ freqs.cpu = policy->cpu;
+
+ nmdk_dbg2(" freqs.new = %d\n", freqs.new);
+ if (freqs.old == freqs.new) {
+ set_cpus_allowed(current, cpus_allowed);
+ return 0;
+ }
+
+#if 0
+ if ( freq_idx == 0)
+ {
+ nomadik_normal_to_slow = 1;
+ nomadik_slow_to_normal = 0;
+ }
+ if (freqs.old == 19200 )
+ {
+ nomadik_slow_to_normal = 1;
+ nomadik_normal_to_slow = 0;
+
+ }
+#endif
+
+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+
+ new_voltage = nomadik_freq_to_voltage(freqs.new);
+ cur_voltage = g_nomadik_voltage;
+ nmdk_dbg2(" new voltage = %d\n", new_voltage);
+ nmdk_dbg2(" old voltage = %d\n", cur_voltage);
+
+ if (new_voltage > cur_voltage) {
+
+ vcore_data = new_voltage;
+
+ result =
+ nomadik_i2c_write_register(I2C_TOUAREG_CLIENT, &vcore_data,
+ 0x1E, 1);
+ if (unlikely(result)) {
+ nmdk_error("i2c write error with ret = %d\n", result);
+ goto err1;
+
+ } else
+ nmdk_dbg2("i2c write vcore_data = 0x%x\n", vcore_data);
+
+#ifdef CPUFREQ_DEBUG
+ vcore_data = 0;
+
+ result =
+ nomadik_i2c_read_register(I2C_TOUAREG_CLIENT, &vcore_data,
+ 0x1E, 1);
+ if (unlikely(result)) {
+ nmdk_error("i2c read error with ret = %d\n", result);
+ goto err1;
+
+ } else
+ nmdk_dbg2("i2c read vcore_data = 0x%x\n", vcore_data);
+
+ if ( vcore_data != new_voltage )
+ {
+ printk("i2c had not written correctly\n");
+ goto err1;
+ }
+#endif
+ g_nomadik_voltage = new_voltage;
+ }
+
+ nomadik_setsys_freq(freq_idx);
+
+ if (new_voltage < cur_voltage) {
+
+ vcore_data = new_voltage;
+ result =
+ nomadik_i2c_write_register(I2C_TOUAREG_CLIENT, &vcore_data,
+ 0x1E, 1);
+ /**
+ * Here even if we are not able to set lower voltage. Still system can
+ * work with previous voltage
+ */
+
+ if (unlikely(result)) {
+ nmdk_error("i2c write error with ret = %d\n", result);
+ goto err1;
+
+ } else
+ nmdk_dbg2("i2c write vcore_data = 0x%x\n", vcore_data);
+ g_nomadik_voltage = new_voltage;
+
+ }
+
+ err1:
+
+ /*
+ * Restore the CPUs allowed mask.
+ */
+ set_cpus_allowed(current, cpus_allowed);
+
+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+#if CPUFREQ_DEBUG
+ {
+ int j;
+ for(j=0; j <= 0x124; j+=4)
+ printk("sdmc[%x] = %x\n", j, readl(0xf0110000 + j ));
+ }
+#endif
+
+ return 0;
+}
+
+#define SRC_PLL_FREQ_OFFSET 0x14
+static unsigned int nomadik_get(unsigned int cpu)
+{
+ cpumask_t cpus_allowed;
+ unsigned int current_freq;
+ unsigned char __iomem *src_base;
+ unsigned long pll_reg;
+ unsigned int pll1_nmul, pll1_pdiv;
+
+ nmdk_dbg_ftrace();
+ cpus_allowed = current->cpus_allowed;
+
+ set_cpus_allowed(current, cpumask_of_cpu(cpu));
+ BUG_ON(cpu != smp_processor_id());
+ src_base = (unsigned char *)IO_ADDRESS(NOMADIK_SRC_BASE);
+ if ( ( readl(src_base) & 0x78 ) == 0x20 )
+ {
+ pll_reg = readl(src_base + SRC_PLL_FREQ_OFFSET);
+ pll1_pdiv = pll_reg & 0x7;
+ pll1_nmul = (pll_reg >> 8) & 0x3f;
+ current_freq = CALC_FREQ(pll1_nmul, pll1_pdiv);
+ }
+ else
+ current_freq = NOMADIK_CPUFREQ_MIN;
+
+ set_cpus_allowed(current, cpus_allowed);
+ nmdk_dbg2("Current_freq = %d\n", current_freq);
+ nmdk_dbg2("pll1_nmul = 0x%x pll1_pdiv = 0x%x\n", pll1_nmul, pll1_pdiv);
+
+ g_nomadik_voltage = nomadik_freq_to_voltage(current_freq);
+ nmdk_dbg2("g_nomadik_voltage = %x\n", g_nomadik_voltage);
+ return current_freq;
+}
+
+static int nomadik_cpufreq_init(struct cpufreq_policy *policy)
+{
+
+ /* set default policy and cpuinfo */
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+ policy->cpuinfo.max_freq = NOMADIK_CPUFREQ_MAX;
+ policy->cpuinfo.min_freq = NOMADIK_CPUFREQ_MIN;
+ policy->cpuinfo.transition_latency = NOMADIK_CPUFREQ_TRANS_LATENCY;
+ policy->cur = policy->min = policy->max = nomadik_get(policy->cpu);
+ nmdk_dbg2("max cpu freq = %d min cpu freq = %d\n", NOMADIK_CPUFREQ_MAX,
+ NOMADIK_CPUFREQ_MIN);
+
+ return 0;
+}
+
+static struct cpufreq_driver nomadik_driver = {
+ .verify = nomadik_verify_policy,
+ .target = nomadik_set_target,
+ .get = nomadik_get,
+ .init = nomadik_cpufreq_init,
+ .name = "nomadik-cpufreq",
+};
+
+static int __init nomadik_cpu_init(void)
+{
+ return cpufreq_register_driver(&nomadik_driver);
+}
+
+static void __exit nomadik_cpu_exit(void)
+{
+ cpufreq_unregister_driver(&nomadik_driver);
+}
+
+MODULE_AUTHOR("Manish Rathi");
+MODULE_DESCRIPTION("cpufreq driver for ARM Nomadik CPUs");
+MODULE_LICENSE("GPL");
+
+module_init(nomadik_cpu_init);
+module_exit(nomadik_cpu_exit);
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/create_kconfig.pl
@@ -0,0 +1,55 @@
+#! /usr/bin/perl
+#
+# gen_nomadik_kconfig.pl: Generates Kconfig in arch/arm/mach-nomadik/ considering all board specific Kconfig files.
+
+$VAR=@ARGV;
+if (@ARGV != 1)
+{
+ print "Usage: ./create_kconfig.pl \n";
+ print "example: ./create_kconfig.pl arch/arm/mach-nomadik\n";
+ exit(1);
+}
+
+$KPATH=@ARGV[0];
+
+@temp=split(/mach-/, $KPATH);
+@temp1=split(/\//, @temp[1]);
+$mach=@temp1[0];
+$machuc=uc($mach);
+
+if ( -e "$KPATH/Kconfig" ) {
+ exit(0);
+}
+
+open (KCONFIG, "> $KPATH/Kconfig") || die "Can't open file: $!";
+$Kconfig_data="# Automatically generated Kconfig: don't edit\n# To add new board support create $KPATH/_Kconfig file\n\nif ARCH_$machuc\n\nchoice\n\nprompt \"$mach target board\"\n\n";
+print KCONFIG $Kconfig_data;
+
+@filenames =qx(ls $KPATH/*_Kconfig);
+foreach $filename(@filenames)
+ {
+ @temp=split(/mach-$mach\//, $filename);
+ @temp1=split(/_Kconfig/, @temp[1]);
+ $filename=@temp1[0];
+ chomp($filename);
+ $filenameuc=uc($filename);
+ $usc="_";
+ print KCONFIG "config $machuc$usc$filenameuc\n\tbool \"$filename\"\n\thelp\n\t\tSupprots $filename target board for $mach platform\n\n";
+ };
+
+print KCONFIG "endchoice\n\n";
+
+@filenames =qx(ls $KPATH/*_Kconfig);
+foreach $filename(@filenames)
+ {
+ chomp($filename);
+ print KCONFIG "source \"$filename\"\n\n";
+ };
+
+if ( -e "$KPATH/Kconfig-$mach" ) {
+ print KCONFIG "source \"$KPATH/Kconfig-$mach\"\n";
+}
+
+print KCONFIG "endif\n\n";
+close KCONFIG;
+
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/deep_sleep.S
@@ -0,0 +1,655 @@
+/*
+ * arch/arm/mach-nomadik/deep_sleep.S
+ *
+ * Copyright 2007, STMicroelectronics
+ *
+ * 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
+ *
+ */
+
+#include
+#include
+
+.global nomadik_deep_sleep
+.extern L2dummyPointer
+
+nomadik_deep_sleep:
+ /*Store all the general purpose registers along with the link register*/
+ stmfd sp!,{r0-r12,lr}
+
+ /* save the first parameter passed to function nomadik_deep_sleep to r12*/
+ mov r12,r0
+
+ /* save the second parameter passed to function nomadik_deep_sleep to the variable addr - mpmc_base*/
+ ldr r11, =mpmc_base
+ str r1,[r11]
+
+ /* save the third parameter passed to function nomadik_deep_sleep to the variable addr - backup_ram_base */
+ ldr r11, =backup_ram_base
+ str r2,[r11]
+
+
+
+ ldr r11, =backup_ram_store
+ mov r10,#0x250
+ add r10, r2, r10
+ str r10, [r11, #0x0]
+
+#ifdef DEEP_SLEEP_DEBUG
+ /*Clean entire DCache using test and clean*/
+clean_dcache_start:
+ mrc p15,0,r15,c7,c14,3
+ bne clean_dcache_start
+
+ /* Invalidate I cache and Dcache */
+ mov r0,#0
+ mcr p15,0,r0,c7,c7,0
+
+ /*Drain Write Buffers*/
+ mov r0,#0
+ mcr p15,0,r0,c7,c10,4
+#endif
+
+ /* Storing the enabled values of VIC */
+ ldr r0, =vic_base
+ ldr r0, [r0,#0x0]
+
+ ldr r1, [r0,#0xC] /* Interrupt sslection register */
+ ldr r2, [r0, #0x2C]
+ ldr r3, [r0, #0x10] /* Interrupt Enable register */
+ ldr r4, [r0, #0x30]
+ ldr r5, [r0, #0x54] /* Default VAR */
+ stmfd sp!, {r1-r5}
+
+
+
+ ldr r1,[r0,#0x100]
+ ldr r2,[r0,#0x104]
+ ldr r3,[r0,#0x108]
+ ldr r4,[r0,#0x10C]
+ ldr r5,[r0,#0x110]
+ ldr r6,[r0,#0x114]
+ ldr r7,[r0,#0x118]
+ ldr r8,[r0,#0x11C]
+ ldr r9,[r0,#0x120]
+ ldr r10,[r0,#0x124]
+ ldr r11,[r0,#0x128]
+ stmfd sp!,{r1-r11}
+
+ ldr r1,[r0,#0x12C]
+ ldr r2,[r0,#0x130]
+ ldr r3,[r0,#0x134]
+ ldr r4,[r0,#0x138]
+ ldr r5,[r0,#0x13C]
+ ldr r6,[r0,#0x200]
+ ldr r7,[r0,#0x204]
+ ldr r8,[r0,#0x208]
+ ldr r9,[r0,#0x20C]
+ ldr r10,[r0,#0x210]
+ ldr r11,[r0,#0x214]
+ stmfd sp!,{r1-r11}
+
+
+ ldr r1,[r0,#0x218]
+ ldr r2,[r0,#0x21C]
+ ldr r3,[r0,#0x220]
+ ldr r4,[r0,#0x224]
+ ldr r5,[r0,#0x228]
+ ldr r6,[r0,#0x22C]
+ ldr r7,[r0,#0x230]
+ ldr r8,[r0,#0x234]
+ ldr r9,[r0,#0x238]
+ ldr r10,[r0,#0x23C]
+ stmfd sp!,{r1-r10}
+
+
+
+
+
+ mrc p15,0, r0,c5,c0,0 /* FSR--Domain Fault */
+ mrc p15,0, r1,c5,c0,1 /* FSR--Instruction Fault */
+
+ mrc p15,0, r2,c6,c0,0 /* FAR */
+
+ mrc p15,0, r3,c9,c0,0 /* Read Dcache Lockdown */
+ mrc p15,0, r4,c9,c0,1 /* Read ICache Lockdown */
+
+ mrc p15,0, r5,c9,c1,0 /* Read Data TLB */
+ mrc p15,0, r6,c9,c1,1 /* Read Instruction TCM region register */
+
+ mrc p15,0, r7,c10,c0,0 /* Data TLB LockDown operation */
+
+ mrc p15,0, r8,c13,c0,0 /* FCSE--PID */
+ mrc p15,0, r9,c13,c0,1 /* Context-ID */
+
+ /* Save all these registers onto the stack */
+ stmfd sp!, {r0-r9}
+
+ /*Move sp to non banked register. sp is not shared in banked modes.*/
+ mov r6, sp
+
+ /* Store the two user mode registers*/
+ sub r6,r6,#0x8
+ stmia r6, {sp, lr}^
+ mov r0,r0
+
+ /* Save current mode with interrupts disabled*/
+ mrs r7, cpsr
+ stmfd r6!, {r7}
+ bic r7,r7,#0xf
+
+ /* move the first par from r12 to r3 */
+ mov r3,r12
+
+ /** Following are the registers that are used
+ R6:- Stack Pointer
+ R7:- CPSR Value [IRQ Disabled , FIQ Disabled, Mode bit Cleared]
+ R8:- Virtual Address of Backup SRAM (0xA0010250)
+ R9:- UART1 Base Register [Debug Device Base Register]
+ R10:- MPMC Base Register
+ R11:- SRC Base Register
+ R12:- PMU Base Register
+ */
+
+ ldr r8,=backup_ram_store
+ ldr r8, [r8,#0]
+
+ ldr r9,=uart1_base
+ ldr r9, [r9,#0]
+
+ ldr r10,=mpmc_base
+ ldr r10, [r10,#0]
+
+ ldr r11,=src_base
+ ldr r11, [r11,#0]
+
+ ldr r12,=pmu_base
+ ldr r12, [r12,#0]
+
+ /*Store the jump back address at this location (physical Address) */
+ ldr r0, =backup_ram_base
+ ldr r0, [r0,#0]
+
+ ldr r1, =after_deep_sleep
+ mov r2, #0xC0000000
+ sub r1, r1, r2 /* Change from VA to PA */
+
+ str r1, [r0]
+
+ /*Enter FIQ mode-Interrupt disabled and save the banked registers*/
+ orr r0,r7,#0x1
+ msr cpsr_cxsf,r0
+
+ mrs r0,spsr
+ stmfd r6!, {r0,r8-r14} /* store r8 to r14 and spsr */
+
+ /*Enter IRQ mode-Interrupt disabled Save: r13,r14 and spsr*/
+ orr r0,r7,#0x2
+ msr cpsr_cxsf,r0 /* enter IRQ mode with IRQ/FIQ disable */
+
+ mrs r0,spsr
+ stmfd r6!, {r0,r13,r14}
+
+
+ /*Enter Abort mode-IRQ/FIQ disable. Save r13,r14 and spsr */
+ orr r0,r7,#0x7
+ msr cpsr_cxsf,r0
+
+ mrs r0,spsr
+ stmfd r6!, {r0,r13,r14}
+
+
+ /*Enter Undef Mode-IRQ/FIQ disable. Save r13,r14 and spsr */
+ orr r0,r7,#0xB
+ msr cpsr_cxsf,r0
+
+ mrs r0,spsr
+ stmfd r6!, {r0,r13,r14}
+
+
+ /*Store the top of stack [VA] in the Scratch-Pad Register*/
+ str r6,[r12,#0x14]
+
+ /*Go back in SVC mode*/
+ orr r0,r7,#0x3
+ msr cpsr_cxsf,r0
+
+ /* Store MMU registers */
+ /*Domain Register on Back-up RAM structure*/
+ mrc p15,0,r0,c3,c0,0
+ str r0,[r8]
+
+ /*TTB Register*/
+ mrc p15,0,r0,c2,c0,0
+ str r0,[r8,#0x4]
+
+ /*MMU Enable Register*/
+ mrc p15,0,r0,c1,c0,0
+ str r0,[r8,#0x8]
+
+ /* Virtual Address of MMU Enable*/
+ adr r0,mmu_enabled
+ str r0,[r8,#0xC]
+
+
+ /*Clear the Remap bit from SRC-Register*/
+ ldr r0,[r11]
+ bic r0,r0,#0x100
+ str r0,[r11]
+
+ /*Enable the Mode Status Register*/
+ mov r0,#0
+ str r0,[r11,#0x8]
+
+ /* Clear the PMU bit - for entering the deep sleep mode instead sleep*/
+ ldr r0,[r12]
+ bic r0,r0,#0x10
+ str r0,[r12]
+
+ /*Store the value of Scratch-Pad Register*/
+ ldr r0,=backup_ram_base_phys
+ ldr r0,[r0,#0x0]
+ str r0,[r12,#0x10]
+
+ /*Program to wake-up in Normal mode*/
+ ldr r0,[r11,#0x4]
+ bic r0,r0,#0xf
+ orr r0,r0,#0x9
+ str r0,[r11,#0x4]
+
+ /*Clean entire DCache using test and clean*/
+clean_dcache:
+ mrc p15,0,r15,c7,c10,3
+ bne clean_dcache
+
+ /*Drain Write Buffers*/
+ mov r0,#0
+ mcr p15,0,r0,c7,c10,4
+
+ ldr r0, =L2dummyPointer
+ ldr r0, [r0]
+ mov r1, #0
+ cmp r1, r0
+ stmneia r0!,{r1-r8}
+
+#ifdef CONFIG_L2CACHE_ENABLE
+ v_l2_cache_clean_and_invalidate r0, r1
+ v_l2_cache_sync r0, r1
+ v_l2_cache_disable r0,r1
+
+#endif
+
+
+ /* Prefetch certain instructions in the cache. */
+ adr r4, cache_prefetch_start
+ adr r5, cache_prefetch_end
+ mvn r1,#0x1F
+ ands r4,r1,r4
+fetch_loop:
+ mcr p15, 0, r4, c7, c13,1
+ cmp r4,r5
+ addls r4, r4, #0x20
+ bls fetch_loop
+
+
+cache_prefetch_start:
+ ldr r10, =mpmc_base
+ ldr r10,[r10,#0x0]
+
+/* Check sdram is idle */
+poll_loop:
+ ldr r1,[r10, #0x4]
+ ands r1,r1,#0x1
+ cmp r1,#0
+ bne poll_loop
+
+ /*Put SDRAM in self-refresh mode*/
+ ldr r1,[r10, #0x20]
+ bic r1,r1,#0x1
+ orr r1,r1,#0x04
+ str r1,[r10, #0x20]
+
+ /*Wait for SDRAM to go in self-refresh*/
+wait:
+ ldr r1,[r10,#0x4]
+ and r1,r1,#0x4
+ cmp r1,#0x0
+ beq wait
+
+
+
+
+ /*Move system to sleep mode*/
+ ldr r1,[r11]
+ bic r1, r1, #0x7
+ str r1,[r11]
+
+goto_sleep:
+ ldr r1,[r11]
+ and r1,r1,#0x78
+ cmp r1,#0x0
+ bne goto_sleep
+
+
+ nop
+ nop
+ nop
+ nop
+
+
+
+
+/* For deepsleep this much pre-fetch is enough */
+cache_prefetch_end:
+ mov r0, r0
+ mov r0, r0
+ mov r0, r0
+ mov r0, r0
+
+
+after_deep_sleep:
+/* Restore the MMU registers */
+
+
+
+ ldr r8,=backup_ram_store_phys
+ mov r9, #0xC0000000
+ sub r8, r8, r9 /* Change from VA to PA */
+ ldr r8, [r8,#0]
+
+
+
+out_of_sleep:
+ /*Domain Register*/
+ ldr r0,[r8, #0x0]
+ mcr p15,0,r0,c3,c0,0
+
+ /*TTB Register*/
+ ldr r0,[r8,#0x4]
+ mcr p15,0,r0,c2,c0,0
+
+
+ /* Virtual Address of mmu_enabled*/
+ ldr r4, [r8, #0xC]
+
+ /*MMU Enable Register*/
+ ldr r1, [r8,#0x8]
+ mcr p15,0,r1,c1,c0,0
+
+ mov pc,r4
+ mov r0, r0
+ mov r0, r0
+ mov r0, r0
+ mov r0, r0
+
+
+
+mmu_enabled:
+
+#ifdef DEEP_SLEEP_DEBUG
+ ldr r9, =uart1_base
+ ldr r9, [r9,#0]
+#endif
+
+ ldr r11, =src_base
+ ldr r11, [r11,#0]
+ ldr r12, =pmu_base
+ ldr r12, [r12,#0]
+ ldr r10, =mpmc_base
+ ldr r10, [r10,#0]
+
+
+
+ /* Move system to Normal Mode */
+ ldr r1,[r11]
+ orr r1,r1,#0x4
+ bic r1,r1,#0x3
+ str r1,[r11]
+
+
+ /*Wait for the system to move in normal mode*/
+wait_norm1:
+ ldr r0,[r11, #0x0]
+ and r0,r0,#0x78
+ cmp r0, #0x20
+ bne wait_norm1
+
+
+ /* Remove the chip from Interrupt mode */
+ ldr r0,[r11, #0x4]
+ bic r0,r0,#0x1
+ str r0,[r11, #0x4]
+
+ /* Clear the interrupt mode status bit*/
+ mov r0, #0x0
+ str r0, [r11, #0x8]
+
+ /* For CLCD Refresh issue */
+ ldr r1, =0x00000005 /* Loading the value with timeout so as to avoid flickering on CLCD */
+ str r1, [r10, #0x408]
+
+
+ /* Stack Restoration Routine */
+ ldr r6,[r12,#0x14]
+
+ /* Store the value of cpsr in r7*/
+ mrs r7,cpsr
+ orr r7,r7,#0xC0 /*Not Needed*/
+ bic r7,r7,#0xf
+
+ /*Move to undef mode and restore everything*/
+ orr r0,r7,#0xB
+ msr cpsr_cxsf,r0
+
+ ldmfd r6!, {r0,r13,r14}
+ msr spsr_cxsf,r0
+
+ /*Enter Abort mode-IRQ/FIQ disable. Save r13,r14 and spsr */
+ orr r0,r7,#0x7
+ msr cpsr_cxsf,r0
+
+ ldmfd r6!, {r0,r13,r14}
+ msr spsr_cxsf,r0
+
+ /*Enter IRQ mode-Interrupt disabled Save: r13,r14 and spsr*/
+ orr r0,r7,#0x2
+ msr cpsr_cxsf,r0
+
+ ldmfd r6!, {r0,r13,r14}
+ msr spsr_cxsf,r0
+
+
+ /*Enter FIQ mode-Interrupt disabled and save the banked registers. Save: r8-r14 and spsr*/
+ orr r0,r7,#0x1
+ msr cpsr_cxsf,r0
+
+ ldmfd r6!, {r0,r8-r14}
+ msr spsr_cxsf,r0
+
+ /* Here we will restore our cpsr..IRQ/FIQ Disabled*/
+ ldr r0, [r6]
+ msr cpsr_cxsf, r0
+ add r6, r6,#4
+
+ /*Now only two user-mode registers are left*/
+ ldmia r6,{sp, lr}^
+ mov r0,r0
+ add r6,r6,#8
+
+ /*Restore sp*/
+ mov sp,r6
+
+
+ /*ReStore the remaining items*/
+ ldmfd sp!, {r0-r9}
+
+ mcr p15,0, r0,c5,c0,0 /*FSR--Domain Fault */
+ mcr p15,0, r1,c5,c0,1 /*FSR--Instruction Fault */
+
+ mcr p15,0, r2,c6,c0,0 /* FAR */
+
+ mcr p15,0, r3,c9,c0,0 /* Read Dcache Lockdown */
+ mcr p15,0, r4,c9,c0,1 /* Read ICache Lockdown */
+
+ mcr p15,0, r5,c9,c1,0 /* Read Data TLB */
+ mcr p15,0, r6,c9,c1,1 /* Read Instruction Lockdown */
+
+ mcr p15,0, r7,c10,c0,0 /* Data TLB LockDown operation */
+
+ mcr p15,0, r8,c13,c0,0 /* FCSE--PID */
+ mcr p15,0, r9,c13,c0,1 /* Context-ID */
+
+
+
+
+
+
+ /* ReStoring the enabled values of VIC */
+ ldr r0, =vic_base
+ ldr r0, [r0,#0]
+
+ ldmfd sp!,{r1-r10}
+ str r1,[r0,#0x218]
+ str r2,[r0,#0x21C]
+ str r3,[r0,#0x220]
+ str r4,[r0,#0x224]
+ str r5,[r0,#0x228]
+ str r6,[r0,#0x22C]
+ str r7,[r0,#0x230]
+ str r8,[r0,#0x234]
+ str r9,[r0,#0x238]
+ str r10,[r0,#0x23C]
+
+
+ ldmfd sp!,{r1-r11}
+ str r1,[r0,#0x12C]
+ str r2,[r0,#0x130]
+ str r3,[r0,#0x134]
+ str r4,[r0,#0x138]
+ str r5,[r0,#0x13C]
+ str r6,[r0,#0x200]
+ str r7,[r0,#0x204]
+ str r8,[r0,#0x208]
+ str r9,[r0,#0x20C]
+ str r10,[r0,#0x210]
+ str r11,[r0,#0x214]
+
+
+
+ ldmfd sp!,{r1-r11}
+ str r1,[r0,#0x100]
+ str r2,[r0,#0x104]
+ str r3,[r0,#0x108]
+ str r4,[r0,#0x10C]
+ str r5,[r0,#0x110]
+ str r6,[r0,#0x114]
+ str r7,[r0,#0x118]
+ str r8,[r0,#0x11C]
+ str r9,[r0,#0x120]
+ str r10,[r0,#0x124]
+ str r11,[r0,#0x128]
+
+ ldmfd sp!, {r1-r5}
+ str r1, [r0,#0xC] /* Interrupt sslection register */
+ str r2, [r0, #0x2C]
+ str r3, [r0, #0x10] /* Interrupt Enable register */
+ str r4, [r0, #0x30]
+ str r5, [r0, #0x54] /* Default VAR */
+
+
+
+ /*Clean entire DCache using test and clean*/
+clean_dcache_end:
+ mrc p15,0,r15,c7,c14,3
+ bne clean_dcache_end
+
+
+ /* Invalidate I cache and Dcache */
+ mov r0,#0
+ mcr p15,0,r0,c7,c7,0
+
+ /*Drain Write Buffers*/
+ mov r0,#0
+ mcr p15,0,r0,c7,c10,4
+
+ mov r0,#0
+ mcr p15, 0, r0, c8, c7, 0 @ invalidate I & D TLBs
+
+ mov r0,#0
+ mov r0,#0
+ mov r0,#0
+ mov r0,#0
+
+
+#ifdef DEEP_SLEEP_DEBUG
+ ldr r0, =uart1_base
+ ldr r0, [r0,#0x0]
+ mov r1, #0x65
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+ mov r1, #0x66
+ str r1, [r0]
+#endif
+
+
+/*Try to go back also...FIQ Disabled...IRQ Disabled*/
+ ldmfd sp!,{r0-r12,pc}
+
+
+uart1_phys:
+ .word 0x101FB000
+src_phys:
+ .word 0x101E0000
+backup_ram_store_phys:
+ .word 0x80010250
+mtu0_base:
+ .word 0xf01E2000
+
+uart1_base:
+ .word 0xf01FB000
+src_base:
+ .word 0xf01E0000
+pmu_base:
+ .word 0xf01E9000
+fsmc_base:
+ .word 0xf0100000
+backup_ram_base_phys:
+ .word 0x80010000
+vic_base:
+ .word 0xf0140000
+mpmc_base:
+ .word 0xf0110000
+backup_ram_store:
+ .word 0x80010250
+backup_ram_base:
+ .word 0x80010000
+.end
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/dfs.S
@@ -0,0 +1,355 @@
+/*
+ * arch/arm/mach-nomadik/sleep.c
+ *
+ * Copyright 2007, STMicroelectronics
+ *
+ * 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
+ *
+ * Low-level Nomadik DFS support
+ */
+
+.align 5
+.globl dfs
+
+
+dfs:
+ stmfd sp!,{r4-r12,lr}
+
+ str r3, bkup_adr_base
+ add r4, r3, #8
+ str r4, bkup_adr
+ add r4, r3, #0x1c8
+ str r4, bkup_data
+ add r4, r3, #0x388
+ str r4, bkup_action
+ add r4, r3, #0x3f8
+ str r4, bkup_size
+
+ ldr r9, bkup_size
+ ldr r9,[r9]
+ ldr r10,bkup_adr
+ ldr r11,bkup_data
+ ldr r12,bkup_action
+
+ mrc p15, 0, r3, c10, c0, 0 /* read the lockdown register */
+ orr r3, r3, #1 /* set the preserved bit */
+ mcr p15, 0, r3, c10, c0, 0 /* write to the lockdown register */
+
+
+
+
+ ldr r4, mpmc_base
+ mcr p15, 0, r4, c8, c7, 1
+ ldr r4, [r4]
+ mrc p15, 0, r3, c10, c0, 0
+
+
+ ldr r4, src_base
+ mcr p15, 0, r4, c8, c7, 1
+ ldr r4, [r4]
+ mrc p15, 0, r3, c10, c0, 0
+
+ ldr r4, bkup_adr_base
+ mcr p15, 0, r4, c8, c7, 1
+ ldr r4, [r4]
+ mrc p15, 0, r3, c10, c0, 0
+
+
+ bic r3, r3, #1 /* clear preserve bit */
+ mcr p15, 0, r3, c10, c0, 0 /* write to the lockdown register */
+
+ ldr r7,mpmc_base
+ ldr r8,src_base
+
+/*
+ mov r7, #0xf0
+ lsl r7, #8
+ orr r7, r7, #0x11
+ lsl r7, #16
+
+ mov r8, #0xf0
+ lsl r8, #8
+ orr r8, r8, #0x1e
+ lsl r8, #16
+*/
+
+
+ /* Prefetch certain instructions in the cache. */
+ adr r4, cache_prefetch_start1
+ adr r5, cache_prefetch_end1
+ mvn r3,#0x1F
+ ands r4,r3,r4
+fetch_loop:
+ mcr p15, 0, r4, c7, c13,1
+ cmp r4,r5
+ addls r4, r4, #0x20
+ bls fetch_loop
+
+mov r0,r0
+mov r0,r0
+mov r0,r0
+mov r0,r0
+
+
+cache_prefetch_start1:
+
+ /**
+ *Put SDRAM in self-refresh mode
+ */
+ ldr r3,[r7, #0x20]
+ orr r3,r3,#0x04
+ str r3,[r7, #0x20]
+
+
+ /**
+ *Wait for SDRAM to go in self-refresh
+ */
+wait_till_selfrefresh :
+ ldr r3,[r7,#0x4]
+ and r3,r3,#0x4
+ cmp r3,#0x0
+ beq wait_till_selfrefresh
+
+
+ /**
+ * Stop the DLL, leave SDMC on
+ */
+ ldr r3,[r7]
+ bic r3,r3,#0x2
+ str r3,[r7]
+
+ /**
+ *Move the system in Slow mode
+ */
+ ldr r3,[r8]
+ bic r3,r3,#0x7
+ orr r3,r3,#0x2
+ str r3,[r8]
+
+wait_till_slow_mode:
+ ldr r3,[r8]
+ and r3,r3,#0x78
+ cmp r3,#0x10
+ bne wait_till_slow_mode
+
+ ldr r3,[r8]
+ bic r3,r3,#0x6000
+ orr r3,r3,r2,LSL #13
+ str r3,[r8]
+
+ ldr r3,[r8,#0x14]
+ bic r3,r3,#0x3F00
+ bic r3,r3,#0x7
+ orr r3,r3,r0
+ orr r3,r3,r1,LSL #8
+ str r3,[r8,#0x14]
+
+ /**
+ *Move the system in Normal mode
+ */
+ ldr r0,[r8, #0x0]
+ ldr r1, =0xfffffff8
+ and r0,r0,r1
+ orr r0,r0,#0x4
+ str r0,[r8, #0x0]
+
+wait_till_normal_mode:
+ ldr r0,[r8, #0x0]
+ and r0,r0,#0x78
+ cmp r0, #0x20
+ bne wait_till_normal_mode
+
+
+#define ACTION_WRITE 0x01
+#define ACTION_WRITE_AND 0x02
+#define ACTION_WRITE_OR 0x03
+#define ACTION_READ 0x04
+#define ACTION_POLL 0x05
+#define ACTION_POLL_AND 0x06
+#define ACTION_POLL_OR 0x07
+#define ACTION_WAIT 0x08
+
+/*
+ ldr r12,bkup_size
+ ldr r9,[r12]
+
+ ldr r10,bkup_adr
+ ldr r11,bkup_data
+ ldr r12,bkup_action
+*/
+
+
+ mov r8,#0x0
+loop1:
+ cmp r8,r9
+ beq end1
+
+ ldr r7,[r10]
+ ldr r6,[r11]
+ ldr r5,[r12]
+
+ mov r2,r8
+ and r2,r2,#0x3
+ mov r2,r2,LSL #0x3
+ mov r5,r5,LSR r2
+ and r5,r5,#0xFF
+
+
+ /**
+ Decide action to be taken
+ */
+ ldr r4,=ACTION_WRITE
+ cmp r5,r4
+ beq action_write
+ ldr r4,=ACTION_WRITE_AND
+ cmp r5,r4
+ beq action_write_and
+ ldr r4,=ACTION_WRITE_OR
+ cmp r5,r4
+ beq action_write_or
+ ldr r4,=ACTION_READ
+ cmp r5,r4
+ beq action_read
+ ldr r4,=ACTION_POLL
+ cmp r5,r4
+ beq action_poll
+ ldr r4,=ACTION_POLL_AND
+ cmp r5,r4
+ beq action_poll_and
+ ldr r4,=ACTION_POLL_OR
+ cmp r5,r4
+ beq action_poll_or
+ ldr r4,=ACTION_WAIT
+ cmp r5,r4
+ beq action_wait
+ b action_end
+action_write:
+#if 0
+ mov r4, #0xf0
+ lsl r4, #8
+ orr r4, #0x1f
+ lsl r4, #8
+ orr r4, #0xb0
+ lsl r4, #8
+
+ mov r3, #0x73
+ str r3, [r4]
+#endif
+ str r6,[r7]
+ b action_end
+action_write_and:
+
+ b action_end
+action_write_or:
+ ldr r3,[r7]
+ orr r3,r3,r6
+ str r3,[r7]
+ b action_end
+action_read:
+ ldr r3,[r7]
+ b action_end
+action_poll:
+ b action_end
+action_poll_and:
+ b action_end
+action_poll_or:
+ b action_end
+action_wait:
+ cmp r6,#0x0
+ beq action_end
+ sub r6,r6,#0x1
+ b action_wait
+action_end:
+
+ add r10,r10,#0x4
+ add r11,r11,#0x4
+ /**
+ * Determine if r8 is multiple of 4 and r12 must be increased
+ */
+ mov r2,r8
+ and r2,r2,#0x3
+ cmp r2,#0x3
+ bne incr8
+ add r12,r12,#0x4
+incr8:
+ add r8,r8,#0x01
+ b loop1
+end1:
+
+ mov r10, #0xf0
+ lsl r10, #8
+ orr r10, r10, #0x11
+ lsl r10, #16
+
+
+
+
+ ldr r1,[r10]
+ orr r1,r1,#0x2
+ str r1,[r10]
+
+ /* Wait for the DLL to lock */
+waitlock:
+ ldr r1,[r10,#0x4]
+ and r1,r1,#0x8
+ cmp r1,#0x0
+ beq waitlock
+
+ /* Exit DDR-SDRAM from self-refresh mode */
+ ldr r1,[r10, #0x20]
+ bic r1,r1,#0x04
+ str r1,[r10, #0x20]
+
+ /* Wait for DDR-SDRAM to exit from self-refresh */
+loop_refresh:
+ ldr r1,[r10,#0x4]
+ and r1,r1,#0x4
+ cmp r1,#0x4
+ beq loop_refresh
+
+
+ ldmfd sp!,{r4-r12,pc}
+
+mov r0,r0
+mov r0,r0
+mov r0,r0
+mov r0,r0
+
+cache_prefetch_end1 : /* This is the end of the code to be copied into eSRAM */
+mov r0,r0
+mov r0,r0
+mov r0,r0
+mov r0,r0
+
+bkup_adr_base :
+ .word 0x80010000
+bkup_adr :
+ .word 0x80010008
+bkup_data :
+ .word 0x800101C8
+bkup_action :
+ .word 0x80010388
+bkup_size :
+ .word 0x800103F8
+src_base :
+ .word 0xf01E0000
+mpmc_base :
+ .word 0xf0110000
+uart1_base :
+ .word 0xf01fb000
+
+
+
+
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/dma.c
@@ -0,0 +1,1337 @@
+/*
+ * arch/arm/mach-nomadik/dma.c
+ *
+ * Copyright 2007, STMicroelectronics
+ *
+ * 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
+ *
+ * Nomadik DMA driver to support standard APIs.
+ * the API details can be found at ./Documentation/arm/STM-Nomadik/dma_user_guide.txt
+ *
+ * Author : Prafulla WADASKAR
+ */
+#define DMA_VER "2.1.0"
+
+#include /* module functions */
+#include
+#include
+#include
+#include /* For wait queues */
+#include
+#include
+#include /* spinlocks */
+#include /* err nos */
+#include /* wait macros */
+#include /* GFP flags */
+#include /* Amba device register */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include /* for cli etc */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define DMA_NAME "DMA"
+
+#ifndef DMA_DEBUG
+#define DMA_DEBUG 0
+#endif
+
+#define NMDK_DEBUG DMA_DEBUG /* enables/disables nmdk_dbg msgs */
+#define NMDK_DEBUG_PFX DMA_NAME /* msg header represents this module */
+#define NMDK_DBG KERN_ERR /* message level */
+
+/* Macros used to identify standard dma structure elements for Nomadik implimentation*/
+#define dmaconfig_pipeadr(x) ((x)->dma_base)
+
+#define dmaconfig_defconfig(x) ((x)->buf.page)
+#define dmaconfig_config(x) ((x)->buf.offset)
+#define dmaconfig_usrconfig(x) ((x)->buf.dma_address)
+#define dmaconfig_mode(x) ((x)->buf.length)
+
+#define dmaconfig_srcadr(x) ((x)->cur_sg.dma_address)
+#define dmaconfig_destadr(x) ((x)->cur_sg.length)
+
+/*
+ * Constants used for DMA channel priority processing
+ */
+#define QUEUE_ID 0x80
+#define POLICY_CHECK_END 0xff
+const u8 policy_mem2mem[10] ={15,14,13,12,
+ QUEUE_ID+15,QUEUE_ID+14,QUEUE_ID+13,QUEUE_ID+12,
+ POLICY_CHECK_END, POLICY_CHECK_END};
+const u8 policy_undefined[34] ={11,10,9,8,7,6,5,4,3,2,1,0,15,14,13,12,
+ QUEUE_ID+11,QUEUE_ID+10,QUEUE_ID+9,QUEUE_ID+8,
+ QUEUE_ID+7,QUEUE_ID+6,QUEUE_ID+5,QUEUE_ID+4,
+ QUEUE_ID+3,QUEUE_ID+2,QUEUE_ID+1,QUEUE_ID+0,
+ QUEUE_ID+15,QUEUE_ID+14,QUEUE_ID+13,QUEUE_ID+12,
+ POLICY_CHECK_END, POLICY_CHECK_END};
+const u8 policy_high[34] ={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+ QUEUE_ID+0,QUEUE_ID+1,QUEUE_ID+2,QUEUE_ID+3,
+ QUEUE_ID+4,QUEUE_ID+5,QUEUE_ID+6,QUEUE_ID+7,
+ QUEUE_ID+8,QUEUE_ID+9,QUEUE_ID+10,QUEUE_ID+11,
+ QUEUE_ID+12,QUEUE_ID+13,QUEUE_ID+14,QUEUE_ID+15,
+ POLICY_CHECK_END, POLICY_CHECK_END};
+const u8 policy_normal[34] ={4,5,6,7,8,9,10,11,3,2,1,0,12,13,14,15,
+ QUEUE_ID+4,QUEUE_ID+5,QUEUE_ID+6,QUEUE_ID+7,
+ QUEUE_ID+8,QUEUE_ID+9,QUEUE_ID+10,QUEUE_ID+11,
+ QUEUE_ID+3,QUEUE_ID+2,QUEUE_ID+1,QUEUE_ID+0,
+ QUEUE_ID+12,QUEUE_ID+13,QUEUE_ID+14,QUEUE_ID+15,
+ POLICY_CHECK_END, POLICY_CHECK_END};
+const u8 policy_low[34] ={8,9,10,11,7,6,5,4,3,2,1,0,12,13,14,15,
+ QUEUE_ID+8,QUEUE_ID+9,QUEUE_ID+10,QUEUE_ID+11,
+ QUEUE_ID+7,QUEUE_ID+6,QUEUE_ID+5,QUEUE_ID+4,
+ QUEUE_ID+3,QUEUE_ID+2,QUEUE_ID+1,QUEUE_ID+0,
+ QUEUE_ID+12,QUEUE_ID+13,QUEUE_ID+14,QUEUE_ID+15,
+ POLICY_CHECK_END, POLICY_CHECK_END};
+
+
+static char dmach_name[MAX_DMA_CHANNELS * MAX_DMA_CHNAME_SIZE];
+static struct dma_soc_data *socdat;
+static struct dmach_lli *p_lli_pipe[MAX_DMA_HWCHANNELS];
+struct dmach_lli *lli_ptr_log = NULL;
+struct dmach_lli *lli_ptr_phy = NULL;
+#define nomadik_dma_lli_phy_to_logical(x) ((struct dmach_lli *)((u32)(x + (lli_ptr_log - lli_ptr_phy)) & ~0x01))
+
+#define nomadik_dmach_is_active_n_enabled(x) (x & 0x00020001)
+#define nomadik_dma_is_pipe_busy(pipe) (p_lli_pipe[pipe])
+#define nomadik_dma_mark_pipe_busy(pipe) (p_lli_pipe[pipe] = (void *)0xffffffff)
+
+/**
+ * nomadik_dma_channel_of_pipe - To get dma channel irq for provided pipe address
+ * @pipeadr: pipe address w.r.to which channel irq needs for foundout
+ *
+ * finds the pipe number assoicated with channel
+ * if any transfer is already scheduled on a pipe, returns the channel irq of scheduled DMA
+ * if pipe is free, returns null
+ */
+static int nomadik_dma_channel_of_pipe(struct dmach_register *pipeadr)
+{
+ u32 pipe;
+ struct dma_struct * dma;
+
+ pipe= (((u32)pipeadr & 0x0fff) - 0x0100)*2/sizeof(struct dmach_register);
+ if ((u32 *)pipeadr > (u32 *)socdat->dirqdesc[IRQ_DMA1].chip_data) pipe++;
+ if (p_lli_pipe[pipe]) {
+ if (p_lli_pipe[pipe]->mem2.dma) {
+ dma = p_lli_pipe[pipe]->mem2.dma;
+ return dma->dma_irq;
+ } else return 0;
+ }
+ return 0;
+}
+
+/**
+ * nomadik_dma_allocate_llis - Allocates requested number of LLIs
+ * @count: No of LLI buffers requested
+ *
+ * reserves the requested number of llis from internal lli poolf
+ * link them with DMAble LLI addresses so that can be used directly by DMA h/w
+ * return the point of first lli
+ */
+static struct dmach_lli *nomadik_dma_allocate_llis(u32 count)
+{
+ struct dmach_lli *p_lli = lli_ptr_log;
+ struct dmach_lli *p_lli_phy = lli_ptr_phy;
+ struct dmach_lli *p_lli_phylast = (struct dmach_lli *)0x01;
+ unsigned long flags;
+
+ nmdk_dbg_ftrace();
+ if (!(p_lli) || !(count)) return (struct dmach_lli *)NULL;
+ if (count > MAX_DMA_LLIS) return (struct dmach_lli *)NULL;
+ flags = claim_dma_lock();
+ do {
+ if (p_lli == (lli_ptr_log + MAX_DMA_LLIS-2)) {
+ nmdk_error("unable to find free lli.. rechecking...");
+ p_lli = lli_ptr_log;
+ p_lli_phy = lli_ptr_phy;
+ }
+ p_lli++; p_lli_phy++;
+ if (!(p_lli->mem3.next)) {
+ p_lli->mem3.next = p_lli_phylast;
+ count--;
+ p_lli_phylast = (struct dmach_lli *)((u32)p_lli_phy + 0x01);
+ }
+ } while (count);
+ release_dma_lock(flags);
+ return p_lli;
+}
+
+/**
+ * nomadik_dma_deallocate_llis - deallocates/frees the provided lli list
+ * @p_lli: pointer to the first lli
+ *
+ * frees all llis in the provided lli list
+ */
+static void nomadik_dma_deallocate_llis(struct dmach_lli *p_lli)
+{
+ struct dmach_lli *p_lli_bkup;
+
+ nmdk_dbg_ftrace();
+ while (p_lli) {
+ if (!(p_lli)) break;
+ if (!(p_lli->mem3.next)) break;
+ if ((u32)p_lli->mem3.next == 0x01) {
+ p_lli->mem3.next = (struct dmach_lli *)NULL;
+ break;
+ }
+ p_lli_bkup = nomadik_dma_lli_phy_to_logical(p_lli->mem3.next);
+ p_lli->mem3.next = (struct dmach_lli *)NULL;
+ p_lli = p_lli_bkup;
+ }
+}
+
+/**
+ * nomadik_dma_schedule_xfer_on_pipe - Schedules DMA transfer lli on a pipe
+ * @p_pipe: pointer to a pipe on which DMA transfer to be scheduled
+ * @p_lli: pointer to the lli to be scheduled
+ *
+ * finds out the pipe no associated with a pipe
+ * checkes whether pipe is free or busy
+ * if free then
+ * Configures the pipe with LLI data
+ * clears any pending interrupt on a pipe
+ * marks pipe as busy
+ * Enables DMA to strat transfer
+ * if pipe is busy then
+ * queues the lli on the pipe
+ */
+static void nomadik_dma_schedule_xfer_on_pipe(volatile struct dmach_register *p_pipe, struct dmach_lli *p_lli)
+{
+ u32 pipe, i;
+ struct dmach_lli *p_lli_hw, *p_lli_curr;
+ volatile struct dma_register *p_dma_reg;
+
+ nmdk_dbg_ftrace();
+ i= (((u32)p_pipe & 0x0fff) - 0x0100)/sizeof(struct dmach_register);
+ pipe = i*2;
+ if ((u32 *)p_pipe > (u32 *)socdat->dirqdesc[IRQ_DMA1].chip_data) pipe++;
+
+ p_lli->mem1.p_lli_qh = (struct dmach_lli *)NULL; /*Marked this lli as last in queue*/
+ p_lli_curr = p_lli_pipe[pipe];
+ mb();
+ if ((p_lli_curr != (void*)0xffffffff) && (p_lli_curr != NULL) ) {
+ while (p_lli_curr->mem1.p_lli_qh) {
+ nmdk_dbg2("currlli(%p) next_lli (%p)", p_lli_curr, p_lli_curr->mem1.p_lli_qh);
+ p_lli_curr = p_lli_curr->mem1.p_lli_qh; /*go thr lli headers to point last lli head */
+ }
+ p_lli_curr->mem1.p_lli_qh = p_lli;
+ nmdk_dbg2("lli(%p) is queued on PIPE %d at %p", p_lli, pipe, p_lli_curr);
+ } else {
+ /* clear any pending interrupt on this pipe if any */
+ p_dma_reg = (void *)((u32)p_pipe & 0xffff0000);
+ p_dma_reg->tcicr |= 1UL<eicr |= 1UL<mem3.p_lli_hw);
+ p_pipe->sadr = p_lli_hw->mem1.sadr;
+ p_pipe->dadr = p_lli_hw->mem2.dadr;
+ p_pipe->lli = p_lli_hw->mem3.next;
+ p_pipe->cr = p_lli_hw->mem4.cr;
+ nmdk_dbg2("lli (%p) dmach(%p) sadr(%08x) dadr(%08x) lli(%p) cr(%08x)", p_lli, p_pipe,
+ (u32)p_pipe->sadr, (u32)p_pipe->dadr, p_pipe->lli, (u32)p_lli_hw->mem4.cr);
+ mb();
+ p_pipe->cfg = p_lli->mem4.cfg;
+ }
+}
+
+/**
+ * nomadik_dma_free_procesed_pipe - Frees processed LLI on a pipe
+ * @p_pipe: pointer to a pipe on which DMA transfer to be scheduled
+ *
+ * finds out the pipe no associated with a pipe
+ * checkes whether pipe is free or busy, if free then just returns
+ * frees the allocated llis for a pipe
+ * checks whether any transfer is queued on a pipe
+ * if the queue is not empty then
+ * Configures queues lli as current lli
+ * Configures the pipe with LLI data
+ * clears any pending interrupt on a pipe
+ * marks pipe as busy
+ * Enables DMA to strat transfer
+ * if the queue is empty then
+ * marks the pipe as free if not reserved by requesting DMA Channel
+ * otherwise marks the pipe as free
+ */
+static void nomadik_dma_free_procesed_pipe(volatile struct dmach_register *p_pipe)
+{
+ u32 pipe;
+ struct dmach_lli *p_lli;
+ dma_t *dma;
+ struct dmach_lli *p_lli_hw;
+ volatile struct dma_register *p_dma_reg;
+ u32 i;
+
+ nmdk_dbg_ftrace();
+ i= (((u32)p_pipe & 0x0fff) - 0x0100)/sizeof(struct dmach_register);
+ pipe = i*2;
+ if ((u32 *)p_pipe > (u32 *)socdat->dirqdesc[IRQ_DMA1].chip_data) pipe++;
+
+ /* free lli of processed pipe*/
+ if ((p_lli_pipe[pipe] != (void *)0xffffffff) && (p_lli_pipe[pipe] != NULL) ) {
+ dma = (dma_t *)p_lli_pipe[pipe]->mem2.dma;
+ p_lli = p_lli_pipe[pipe]->mem1.p_lli_qh;
+ nomadik_dma_deallocate_llis(p_lli_pipe[pipe]);
+ mb();
+ if (p_lli) {
+ /* clear any pending interrupt on this pipe if any */
+ p_dma_reg = (void *)((u32)p_pipe & 0xffff0000);
+ /*p_dma_reg->tcicr |= 1UL<eicr |= 1UL<mem3.p_lli_hw);
+ p_pipe->sadr = p_lli_hw->mem1.sadr;
+ p_pipe->dadr = p_lli_hw->mem2.dadr;
+ p_pipe->lli = p_lli_hw->mem3.next;
+ p_pipe->cr = p_lli_hw->mem4.cr;
+ nmdk_dbg2("lli (%p) dmach(%p) sadr(%08x) dadr(%08x) lli(%p) cr(%08x)", p_lli, p_pipe,
+ (u32)p_pipe->sadr, (u32)p_pipe->dadr, p_pipe->lli, (u32)p_lli_hw->mem4.cr);
+ mb();
+ p_pipe->cfg = p_lli->mem4.cfg;
+
+ nmdk_dbg2("Scheduling queued transfer on pipe %d (lli(%p))", pipe,
+ p_lli_pipe[pipe]);
+ } else {
+ if ((u32)dmaconfig_mode(dma) & DMA_PIPE_RESERVED)
+ p_lli_pipe[pipe] = (struct dmach_lli *)0xffffffff;
+ else {
+ p_lli_pipe[pipe] = (struct dmach_lli *)NULL;
+ dmaconfig_pipeadr(dma) = (u32)0;
+ }
+ }
+ }
+}
+
+/* removes all allocated requests on the pipe */
+/**
+ * nomadik_dma_flush_pipe - Removes all scheduled and queued transfers on a pipe
+ * @p_pipe: pointer to a pipe on which DMA transfer to be scheduled
+ *
+ * finds out the pipe no associated with a pipe
+ * stops current transfer
+ * traverse through lli heads and flush all queued llis including scheduled one
+ * marks the pipe as free
+ */
+static void nomadik_dma_flush_pipe(volatile struct dmach_register *p_pipe)
+{
+ u32 pipe;
+ struct dmach_lli *p_lli_qh = (struct dmach_lli *)NULL;
+ dma_t *dma;
+
+ nmdk_dbg_ftrace();
+ pipe= (((u32)p_pipe & 0x0fff) - 0x0100)*2/sizeof(struct dmach_register);
+ if ((u32 *)p_pipe > (u32 *)socdat->dirqdesc[IRQ_DMA1].chip_data) pipe++;
+
+ if ((u32)p_lli_pipe[pipe] == 0xffffffff) goto nextt;
+ while (p_lli_pipe[pipe] != 0) {
+ dma = (dma_t *)p_lli_pipe[pipe]->mem2.dma;
+ p_lli_qh = p_lli_pipe[pipe]->mem1.p_lli_qh;
+ nomadik_dma_deallocate_llis(p_lli_pipe[pipe]);
+ p_lli_pipe[pipe] = p_lli_qh;
+ nmdk_dbg2("Flushed lli (%p) for pipe %d", p_lli_pipe[pipe], pipe);
+ };
+ nextt:
+// if ((u32)dmaconfig_mode(dma) & DMA_PIPE_RESERVED)
+// p_lli_pipe[pipe] = (struct dmach_lli *)0xffffffff;
+// else
+ p_lli_pipe[pipe] = (struct dmach_lli *)NULL;
+}
+
+/**
+ * nomadik_dma_check_update_userconfig - updates config as per user configs
+ * @dma: DMA channel structure pointer
+ *
+ * checks the user configuration
+ * if some use configuration is provided by clinet driver during
+ * configuration then abstracts it and updates Channel configuration
+ * data accordingly
+ */
+static void nomadik_dma_check_update_userconfig(dma_t *dma)
+{
+ nmdk_dbg_ftrace();
+ if ((u32)dmaconfig_usrconfig(dma) & DMA_SRC_BSIZE_CONFIGURED) {
+ dmaconfig_config(dma) &= ~(DMA_BSIZE_256);
+ dmaconfig_config(dma) |= ((u32)dmaconfig_usrconfig(dma) & DMA_BSIZE_256);
+ }
+ if ((u32)dmaconfig_usrconfig(dma) & DMA_DEST_BSIZE_CONFIGURED) {
+ dmaconfig_config(dma) &= ~(DMA_BSIZE_256<<3);
+ dmaconfig_config(dma) |= (u32)dmaconfig_usrconfig(dma) & (DMA_BSIZE_256<<3);
+ }
+ if ((u32)dmaconfig_usrconfig(dma) & DMA_SRC_WIDTH_CONFIGURED) {
+ dmaconfig_config(dma) &= ~(DMA_WIDTH_NA);
+ dmaconfig_config(dma) |= ((u32)dmaconfig_usrconfig(dma) & DMA_WIDTH_NA);
+ }
+ if ((u32)dmaconfig_usrconfig(dma) & DMA_DEST_WIDTH_CONFIGURED) {
+ dmaconfig_config(dma) &= ~(DMA_WIDTH_NA<<3);
+ dmaconfig_config(dma) |= (u32)dmaconfig_usrconfig(dma) & (DMA_WIDTH_NA<<3);
+ }
+ nmdk_dbg("usrconfig =%08x, config = %08x", (u32)dmaconfig_usrconfig(dma), (u32)dmaconfig_config(dma));
+}
+
+/**
+ * nomadik_dma_usrdevconfig - updates user configuration as per type
+ * @config: user configuration information
+ * @type: src or destincation peripharal indicator (0= means src)
+ *
+ * checks provided configuration and returns configuration converting
+ * it for soruce or destination peripharal. this API is provided to
+ * facilitate and mistake proffing the configuration by client driver
+ */
+u32 __nomadik_dma_usrdevconfig(u32 config, int type)
+{
+ u32 val =0;
+ if (type == 0) { /*src*/
+ if (config & DMA_DEV_BSIZE_CONFIGURABLE) {
+ val |= DMA_SRC_BSIZE_CONFIGURED;
+ val |= (config & DMA_BSIZE_256);
+ }
+ if (config & DMA_DEV_WIDTH_CONFIGURABLE) {
+ val |= DMA_SRC_WIDTH_CONFIGURED;
+ val |= (config & DMA_WIDTH_NA);
+ }
+ } else { /*dest*/
+ if (config & DMA_DEV_BSIZE_CONFIGURABLE) {
+ val |= DMA_DEST_BSIZE_CONFIGURED;
+ val |= (config & DMA_BSIZE_256)<<3;
+ }
+ if (config & DMA_DEV_WIDTH_CONFIGURABLE) {
+ val |= DMA_DEST_WIDTH_CONFIGURED;
+ val |= (config & DMA_WIDTH_NA)<<3;
+ }
+ }
+ return (val);
+}
+EXPORT_SYMBOL(__nomadik_dma_usrdevconfig);
+
+/**
+ * nomadik_dmach_configure - configures DMA Channel processing default and user configuration
+ * @srcdmadev: name of srouce DMAble device IP
+ * @destdmadev: name of dest DMAble device IP
+ * @dma: DMA channel data structure pointer
+ *
+ * finds out the defult configuration for src and dest devices scanning the config_tbl
+ * prepares DMA configuration from default config of src and dest dmadevices and user
+ * configuration
+ * return 0 on cusess, negative value on failure
+ */
+static int nomadik_dmach_configure(char *src_dmadev, char *dest_dmadev, dma_t *dma)
+{
+ int i;
+ uint8 flag =0;
+
+ nmdk_dbg_ftrace();
+ dmaconfig_config(dma) = 0;
+
+ for (i=0; i < socdat->config_tbl_size; i++) {
+ if (!(strcmp (src_dmadev, (socdat->config_tbl[i].id)))) {
+ dmaconfig_config(dma) |= (u32) (socdat->config_tbl[i].config &
+ (DMA_AHB_M1 | DMA_DEV_BOTH_DMACS_CANBE_USED | DMA_ADR_INC |
+ DMA_WIDTH_NA | DMA_BSIZE_256 |
+ DMA_REQUEST_LINE(31)));
+ flag |=0x01;
+ }
+ if (!(strcmp(dest_dmadev,(socdat->config_tbl[i].id)))) {
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config
+ & DMA_DEV_BOTH_DMACS_CANBE_USED)<<2));
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config & DMA_AHB_M1)<<1));
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config & DMA_ADR_INC)<<1)); /*DI bit*/
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config & DMA_WIDTH_NA)<<3));
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config & DMA_BSIZE_256)<<3));
+ dmaconfig_config(dma) |= (u32)(((socdat->config_tbl[i].config & DMA_REQUEST_LINE(31))<<5));
+ flag |=0x02;
+ }
+ if ((flag & 0x03) == 0x03) {
+ nomadik_dma_check_update_userconfig(dma);
+ nmdk_dbg("conf(%08x), mode=%08x", dmaconfig_config(dma), dmaconfig_mode(dma));
+ return(0);
+ }
+ }
+ nmdk_error("unable to configure dmachanel");
+ return(-1);
+}
+
+/**
+ * nomadik_dma_find_dmahwpipe - Finds and returns free and compatible DMA pipe
+ * @dma: DMA channel data structure pointer
+ *
+ * searches a free pipe as per channel priority policy manager
+ * (refer ./Documentation//arm/STM-Nomadik/dma_user_guide.txt)
+ * checks the configuration for the pipe suitability for transfer
+ * selects the pipe and mark it as busy
+ * returns pipe address if selected
+ * returns NULL in case of unavailability of pipe
+ */
+static struct dmach_register *nomadik_dma_find_dmahwpipe(dma_t *dma)
+{
+ int i;
+ u8 *p_pipe;
+ volatile struct dmach_register *p_dmach_reg;
+ volatile struct dma_register *p_dma_reg;
+ unsigned long flags;
+
+ nmdk_dbg_ftrace();
+
+ flags = claim_dma_lock();
+ /* channel priority setup */
+ if ( MEM_TO_MEM == (u32)dmaconfig_mode(dma)) {
+ p_pipe = (void *)policy_mem2mem;
+ }
+ else if ( (u32)dmaconfig_mode(dma) & DMA_EXCH_PRIORITY_HIGH) {
+ p_pipe = (void *)policy_high;
+ }
+ else if ( (u32)dmaconfig_mode(dma) & DMA_EXCH_PRIORITY_NORMAL) {
+ p_pipe = (void *)policy_normal;
+ }
+ else if ( (u32)dmaconfig_mode(dma) & DMA_EXCH_PRIORITY_LOW) {
+ p_pipe = (void *)policy_low;
+ }
+ else { /* DMA_EXCH_PRIORITY_UNDEFINED) */
+ p_pipe = (void *)policy_undefined;
+ }
+ do {
+ i = *p_pipe & ~QUEUE_ID;
+ /** Advanced Pipe selection strategy, under development */
+ /* skip if pipe is busy and not requested on queued pipe */
+ if (nomadik_dma_is_pipe_busy(i) && (!(*p_pipe & QUEUE_ID))) continue;
+ /* skip if pipe is busy with infinite dma xfer */
+ if (nomadik_dma_is_pipe_busy(i) &&
+ ((dmaconfig_config((dma_t *)p_lli_pipe[i]->mem2.dma)) & DMA_INFINITE_XFER)) continue;
+ if (i & 0x01) {
+ if (((u32)dmaconfig_config(dma) & (DMA_DEV_DMAC1_CANBE_USED | (DMA_DEV_DMAC1_CANBE_USED<<2)))
+ != (DMA_DEV_DMAC1_CANBE_USED | (DMA_DEV_DMAC1_CANBE_USED<<2)) ) continue;
+ p_dma_reg = (struct dma_register *)socdat->dirqdesc[IRQ_DMA1].chip_data;
+ } else {
+ if (((u32)dmaconfig_config(dma) & (DMA_DEV_DMAC0_CANBE_USED | (DMA_DEV_DMAC0_CANBE_USED<<2)))
+ != (DMA_DEV_DMAC0_CANBE_USED | (DMA_DEV_DMAC0_CANBE_USED<<2)) ) continue;
+ p_dma_reg = (struct dma_register *)socdat->dirqdesc[IRQ_DMA0].chip_data;
+ }
+ p_dmach_reg = (struct dmach_register *)&p_dma_reg->dmach[i/2];
+ nomadik_dma_mark_pipe_busy(*p_pipe & ~QUEUE_ID);
+ nmdk_dbg("DMAHW PIPE%d assigned for Dma Channel %d",i, DMACH_FOR_IRQNO(dma->dma_irq));
+ release_dma_lock(flags);
+ return (void *)p_dmach_reg;
+ } while ((*(++p_pipe)) != POLICY_CHECK_END);
+ release_dma_lock(flags);
+ nmdk_error("All HW DMA Chanels busy...");
+ return NULL;
+}
+
+/**
+ * nomadik_dma_req - low level method for request_dma API
+ * @channel: DMA channel number
+ * @dma: DMA channel data structure pointer
+ *
+ * Check for configuration is passed by client
+ * prepares basic channel configuration from dma info provided by client
+ * generate dmach id string from src and dest dmadevtypes
+ * find and reserved a pipe in case of reserved mode requested by client
+ * returns NULL in case of sucess, negative value in case for failure
+ */
+static int nomadik_dma_req(dmach_t channel, dma_t *dma)
+{
+ struct nmdk_dma_info *dma_info =
+ (struct nmdk_dma_info *)dma->device_id;
+ int error;
+
+ nmdk_dbg_ftrace();
+
+ if (! dma->device_id) {
+ nmdk_error("nmdk_dma_info structptr not passed");
+ return (-DMA_CONFIG_INFO_NOT_PASSED);
+ }
+
+ dmaconfig_mode(dma) = (u32)dma_info->mode;
+ dmaconfig_usrconfig(dma) = (u32)dma_info->config;
+
+ /* Prepare dmach configuration form dma_info*/
+ switch((u32)dmaconfig_mode(dma) & FLOW_CNTRL_DEST_PERIPH(PERIPH_TO_PERIPH)) {
+ case MEM_TO_MEM:
+ dma_info->srcdevtype = "mem";
+ dma_info->destdevtype = "mem";
+ break;
+ case FLOW_CNTRL_PERIPH(MEM_TO_PERIPH):
+ case MEM_TO_PERIPH:
+ dma_info->srcdevtype = "mem";
+ break;
+ case FLOW_CNTRL_PERIPH(PERIPH_TO_MEM):
+ case PERIPH_TO_MEM:
+ dma_info->destdevtype = "mem";
+ break;
+ case FLOW_CNTRL_SRC_PERIPH(PERIPH_TO_PERIPH):
+ case FLOW_CNTRL_DEST_PERIPH(PERIPH_TO_PERIPH):
+ case PERIPH_TO_PERIPH:
+ break;
+ default:
+ nmdk_error("Invalid DMA mode");
+ error =-1;
+ goto err_exit;
+ }
+
+ if (! dma_info->srcdevtype) {
+ nmdk_error("srcdevtype not specified");
+ error =-DMA_SRC_DEVICE_NOT_CONFIGURED;
+ goto err_exit;
+ }
+ if (! dma_info->destdevtype) {
+ nmdk_error("destdevtype not specified");
+ error =-DMA_DEST_DEVICE_NOT_CONFIGURED;
+ goto err_exit;
+ }
+ error = nomadik_dmach_configure(dma_info->srcdevtype, dma_info->destdevtype, dma);
+ if (error) goto err_exit;
+
+ /* generate dmach id string from src and dest dmadevtypes */
+ sprintf(dmach_name + (channel * MAX_DMA_CHNAME_SIZE ),
+ "dmaclbk-%s->%s", dma_info->srcdevtype, dma_info->destdevtype);
+ dma->device_id = dmach_name + (channel * MAX_DMA_CHNAME_SIZE) + 8;
+
+ if ((u32)dmaconfig_mode(dma) & DMA_PIPE_RESERVED) {
+ dmaconfig_pipeadr(dma) = (u32)nomadik_dma_find_dmahwpipe(dma);
+ if ((u32)dmaconfig_pipeadr(dma)) {
+ nmdk_dbg("pipe (%p) reserved for channel %d",
+ (void *)dmaconfig_pipeadr(dma), channel);
+ } else {
+ nmdk_error("could not reserve dmach hw pipe");
+ error =-1;
+ goto err_exit;
+ }
+ } else dmaconfig_pipeadr(dma) = (u32)NULL;
+ dma->state = NMDK_DMA_CONFIGURED;
+ return(0);
+
+ err_exit:
+ return(error);
+}
+
+/**
+ * nomadik_dma_en - low level method for enable_dma API
+ * @channel: DMA channel number
+ * @dma: DMA channel data structure pointer
+ *
+ * Checks for channel configured properly
+ * allocates llis for transfer
+ * programm llis for transfer data
+ * checks if the pipe is already available with channel
+ * if not the find and allocates a free pipe for a transfer
+ * program dmach irqname if not set by client
+ * schedules a transfer on a pipe
+ */
+static void nomadik_dma_en(dmach_t channel, dma_t *dma)
+{
+ struct dmach_lli *p_lli_start = (struct dmach_lli *)NULL;
+ struct dmach_lli *p_lli_curr;
+ struct dmach_lli *p_lli_next;
+
+ unsigned long flags;
+ u32 dmacnt, dmacnt_chkval, tmpcnt;
+
+ nmdk_dbg_ftrace();
+
+/* if (dma->invalid) {
+ if (dma->mode) {
+ if (((u32)dmaconfig_mode(dma) & FLOW_CNTRL_DEST_PERIPH(PERIPH_TO_PERIPH) ==
+ (dma->mode & FLOW_CNTRL_DEST_PERIPH(PERIPH_TO_PERIPH)) {
+ dmaconfig_mode(dma) = (u32)dma->mode;
+ }
+ }
+ } else {
+ exit_invl_parms:
+ nmdk_error("enable request without parameters");
+ goto exit_en
+ }
+ if (dma->addr) dmaconfig_srcadr(x) = dma->addr;
+ if (dma->speed) dmaconfig_destadr(x) = (u32)dma->speed;
+*/
+
+ if (!(dma->sg)) {
+ if (!(dma->addr)) {
+ nmdk_error("srcadr not set");
+ goto exit_en;
+ }
+ if (!(dma->speed)) {
+ nmdk_error("destadr not set");
+ goto exit_en;
+ }
+ }
+
+ /*set transfer size = count/src_width */
+ dmacnt = dma->count/(((u32)dmaconfig_config(dma) & 0x000c0000)>>17);
+ nmdk_dbg("total count = %d, dma count =%d",(u32)dma->count, dmacnt);
+ tmpcnt = 0;
+ dmacnt_chkval = 0x0ff0;
+
+ if (dma->sg) {
+ /*Scatter gather list implimentation */
+ if (dma->sgcount == 0) {
+ nmdk_error("Empty scatter gather list");
+ goto exit_en;
+ }
+ if ((((u32)dmaconfig_mode(dma) & 0x03) == MEM_TO_MEM ) ||
+ (((u32)dmaconfig_mode(dma) & 0x03) == PERIPH_TO_PERIPH )) {
+ nmdk_error("Unsupported mode for scatter gather");
+ goto exit_en;
+ }
+ p_lli_start = nomadik_dma_allocate_llis(dma->sgcount +1);
+ p_lli_curr = nomadik_dma_lli_phy_to_logical(p_lli_start->mem3.p_lli_hw);
+#ifdef SCATERGATHER_MMC_DEBUG
+ if (dma->sgcount > 1) {
+ dmaconfig_config(dma) |= 0x0f0007fe;
+ nmdk_dbg("sc_count=%d , config=%08x", dma->sgcount, dmaconfig_config(dma));
+ if (((u32)dmaconfig_mode(dma) & 0x03) == MEM_TO_PERIPH ) {
+ printk("===%p", dma_alloc_coherent( NULL , 4096, &dma->speed, GFP_DMA | GFP_KERNEL ));
+
+ } else {
+ printk("==%p",dma_alloc_coherent( NULL , 4096, &dma->addr, GFP_DMA | GFP_KERNEL ));
+ }
+ dmaconfig_mode(dma) = 0;
+ }
+#endif
+ tmpcnt = dma->count;
+ while (dma->sgcount) {
+ nmdk_dbg("tmpcnt %d, sg_len %d", tmpcnt, dma->sg->length);
+ p_lli_next = nomadik_dma_lli_phy_to_logical(p_lli_curr->mem3.next);
+ if (!(dma->sg->dma_address)) {
+ nmdk_error("sg list not dma mapped");
+ goto exit_en;
+ }
+ if (((u32)dmaconfig_mode(dma) & 0x03) == MEM_TO_PERIPH ) {
+ p_lli_curr->mem1.sadr = dma->sg->dma_address;
+ if (!(dma->speed)) {
+ nmdk_error("destadr not set");
+ goto exit_en;
+ }
+ p_lli_curr->mem2.dadr = (dma_addr_t)dma->speed;
+ } else {
+ if (!(dma->addr)) {
+ nmdk_error("srcadr not set");
+ goto exit_en;
+ }
+ p_lli_curr->mem1.sadr = (dma_addr_t)dma->addr;
+ p_lli_curr->mem2.dadr = dma->sg->dma_address;
+ }
+ if (tmpcnt > dma->sg->length) {
+ p_lli_curr->mem4.cr = (((u32)dmaconfig_config(dma) & 0x0ffff000) |
+ (dma->sg->length/(((u32)dmaconfig_config(dma) & 0x000c0000)>>17)));
+ } else {
+ p_lli_curr->mem4.cr = (((u32)dmaconfig_config(dma) & 0x0ffff000) |
+ (tmpcnt/(((u32)dmaconfig_config(dma) & 0x000c0000)>>17)));
+ }
+ tmpcnt -= dma->sg->length;
+ dma->sgcount--; dma->sg++;
+ if (dma->sgcount == 0) p_lli_curr->mem4.cr |= (1<<31);
+ p_lli_curr = p_lli_next;
+ }
+ } else if ((u32)dmaconfig_mode(dma) & DMA_DOUBLE_BUFFERED ) {
+ p_lli_start = nomadik_dma_allocate_llis(3);
+ p_lli_curr = nomadik_dma_lli_phy_to_logical(p_lli_start->mem3.p_lli_hw);
+ p_lli_next = nomadik_dma_lli_phy_to_logical(p_lli_curr->mem3.next);
+
+ dmacnt /= 2;
+ dmacnt_chkval = dmacnt;
+ /*fill next lli structure */
+ p_lli_curr->mem4.cr = (((u32)dmaconfig_config(dma) & 0x0ffff000) | dmacnt_chkval);
+ p_lli_curr->mem1.sadr = (unsigned int)dma->addr;
+ p_lli_curr->mem2.dadr = dma->speed;
+ p_lli_next->mem4.cr = p_lli_curr->mem4.cr;
+ p_lli_next->mem1.sadr = p_lli_curr->mem1.sadr;
+ p_lli_next->mem2.dadr = p_lli_curr->mem2.dadr;
+ if (p_lli_next->mem4.cr & DMA_ADR_INC) p_lli_next->mem1.sadr += dma->count/2;
+ if (p_lli_next->mem4.cr & (DMA_ADR_INC<<1)) p_lli_next->mem2.dadr += dma->count/2;
+
+ if ((u32)dmaconfig_mode(dma) & DMA_INFINITE_XFER) {
+ p_lli_next->mem3.next = p_lli_start->mem3.p_lli_hw;
+ } else {
+ p_lli_next->mem4.cr |= (1<<31);
+ }
+ } /*mode & DMA_DOUBLE_BUFFERED*/
+ else {
+ tmpcnt = dmacnt/dmacnt_chkval;
+ p_lli_start = nomadik_dma_allocate_llis(tmpcnt + 2);
+ p_lli_curr = nomadik_dma_lli_phy_to_logical(p_lli_start->mem3.p_lli_hw);
+ p_lli_next = p_lli_curr;
+
+ p_lli_curr->mem4.cr = (((u32)dmaconfig_config(dma) & 0x0ffff000) |
+ ((dmacnt < dmacnt_chkval)?dmacnt:dmacnt_chkval));
+ dmacnt -= dmacnt_chkval;
+ p_lli_curr->mem1.sadr = (unsigned int)dma->addr;
+ p_lli_curr->mem2.dadr = dma->speed;
+ while(tmpcnt) {
+ p_lli_next = nomadik_dma_lli_phy_to_logical(p_lli_curr->mem3.next);
+ /*fill next lli structure */
+ p_lli_next->mem4.cr = (((u32)dmaconfig_config(dma) & 0x0ffff000) |
+ ((dmacnt < dmacnt_chkval)?dmacnt:dmacnt_chkval));
+ p_lli_next->mem1.sadr = p_lli_curr->mem1.sadr;
+ p_lli_next->mem2.dadr = p_lli_curr->mem2.dadr;
+ if (p_lli_next->mem4.cr & DMA_ADR_INC)
+ p_lli_next->mem1.sadr += dmacnt_chkval *(((u32)dmaconfig_config(dma) & 0x000c0000)>>17);
+ if (p_lli_next->mem4.cr & (DMA_ADR_INC<<1))
+ p_lli_next->mem2.dadr += dmacnt_chkval *(((u32)dmaconfig_config(dma) & 0x000c0000)>>17);
+
+ p_lli_curr = p_lli_next;
+ dmacnt -= dmacnt_chkval;
+ tmpcnt--;
+ }
+ p_lli_curr->mem4.cr |= (1<<31);
+ if ((u32)dmaconfig_mode(dma) & DMA_INFINITE_XFER) {
+ p_lli_curr->mem3.next = p_lli_start->mem3.p_lli_hw;
+ } else {
+ p_lli_curr->mem4.cr |= (1<<31);
+ }
+ }
+ nmdk_dbg("lli_start(%p)", p_lli_start);
+ p_lli_start->mem2.dma = (void *)dma; /*dma associated with this lii*/
+ p_lli_start->mem4.cfg = (((u32)dmaconfig_config(dma) & 0x000007fe) | /* set src/dest dma periph request line numbers */
+ ((u32)dmaconfig_mode(dma)<<11 & (7<<11)) | /* set flow control and xter type*/
+ (0x0000c001)); /*enable interrupts and start xfer*/
+
+ /* if channel is reserved use predefined hwpipe else find free
+ * h/w pipe to schedule dma
+ * if h/w pipe is not available the que the request
+ */
+ if (!((u32)dmaconfig_pipeadr(dma))) {
+ dmaconfig_pipeadr(dma) = (u32)nomadik_dma_find_dmahwpipe(dma);
+ if (dmaconfig_pipeadr(dma)) {
+ nmdk_dbg("channel %d allocated pipe p_dmach_reg(%p) ",channel, (void *)dmaconfig_pipeadr(dma));
+ } else {
+ nmdk_error("enable requested aborted...No pipe available...");
+ goto exit_en;
+ }
+ }
+ /* program dmach irqname if not set by client */
+ if (socdat->dirqdesc[IRQNO_FOR_DMACH(channel)].action)
+ if (!(socdat->dirqdesc[IRQNO_FOR_DMACH(channel)].action->name))
+ socdat->dirqdesc[IRQNO_FOR_DMACH(channel)].action->name =
+ (dmach_name + (channel * MAX_DMA_CHNAME_SIZE));
+
+ mb();
+ flags = claim_dma_lock();
+ nomadik_dma_schedule_xfer_on_pipe((void *)dmaconfig_pipeadr(dma), p_lli_start);
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_ENABLED;
+ if ((u32)dmaconfig_mode(dma) & DMA_QUEUE_ENABLED) dma->active = 0;
+ return;
+
+exit_en:
+ if (p_lli_start) nomadik_dma_deallocate_llis(p_lli_start);
+ return;
+}
+
+/**
+ * nomadik_dma_dis - low level method for disable_dma API
+ * @channel: DMA channel number
+ * @dma: DMA channel data structure pointer
+ *
+ * disables a transfer on a pipe if associated with a requested channel
+ */
+static void nomadik_dma_dis(dmach_t channel, dma_t *dma)
+{
+ struct dmach_register *p_dmach_reg = (struct dmach_register *)dmaconfig_pipeadr(dma);
+ unsigned long flags;
+
+ nmdk_dbg_ftrace();
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) return;
+ /*Reset E (Chanel Enablne) bit of DMAC_CxCFG reg*/
+ flags = claim_dma_lock();
+ nmdk_dbg("Channel %d disabled on pipe %08x", channel, (u32)dmaconfig_pipeadr(dma));
+ p_dmach_reg->cfg &= ~0x0000c001;
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_DISABLED;
+}
+
+static void nomadik_dma_fr(dmach_t channel, dma_t *dma)
+{
+ nmdk_dbg_ftrace();
+ nomadik_dma_dis(channel, dma);
+ if (socdat->dirqdesc[IRQNO_FOR_DMACH(channel)].action)
+ free_irq(IRQNO_FOR_DMACH(channel), socdat->dirqdesc[IRQNO_FOR_DMACH(channel)].action->dev_id);
+ if (dmaconfig_pipeadr(dma)) nomadik_dma_flush_pipe((void *)dmaconfig_pipeadr(dma));
+}
+
+/* find the available dma chanel and requests the same */
+/**
+ * request_available_dma - Wrapper over request_dma API
+ * @dmach_config_info: DMA channel number
+ * @dma: DMA channel data structure pointer
+ *
+ * Wrapper over request_dma API for free and available DMA channel search
+ * returns DMA Channel number , negative error value in case of failure
+ */
+int request_available_dma(struct nmdk_dma_info * dmach_config_info)
+{
+ dmach_t channel;
+ int error;
+
+ /*removed locks as detected by spinlock debugging on*/
+ for (channel = 0; channel < (MAX_DMA_CHANNELS - 1); channel++) {
+ error = request_dma(channel, (char *)dmach_config_info);
+ if (-EBUSY == error) continue;
+ if (error < 0) {
+ nmdk_error("Request DMA error");
+ return error;
+ } else {
+ nmdk_dbg("Dma Chanel %d is available and allocated", channel);
+ return channel;
+ }
+ }
+ nmdk_error("All DMA Channels occupied....");
+ return -DMA_ALLCHANELS_OCCUPIED;
+}
+EXPORT_SYMBOL(request_available_dma);
+
+/**
+ * suspend_dma - Pauses DMA transfer for this channel
+ * @channel: DMA channel number
+ *
+ * This API will pause current dma if it is ongoing
+ * also this API is used to pause all active on going DMA channels involved
+ * with memory transfer by passing DMA_ALL_MEM_CHANNELS as an argument
+ */
+void suspend_dma(dmach_t channel)
+{
+ dma_t *dma;
+ volatile struct dmach_register *p_dmach_reg;
+ unsigned long flags;
+
+ nmdk_dbg_ftrace();
+ if (!(socdat->dma_chan)) goto inactive_dma;
+ dma = socdat->dma_chan;
+ if (DMA_ALL_MEM_CHANNELS == channel) {
+ for (channel=0; channel< MAX_DMA_CHANNELS; channel++) {
+ if (!dma->lock) continue;
+ if (NMDK_DMA_SUSPENDED == dma->state) continue;
+ if (((u32)dmaconfig_mode(dma)&PERIPH_TO_PERIPH)
+ == PERIPH_TO_PERIPH) continue;
+ p_dmach_reg = (struct dmach_register *)dmaconfig_pipeadr(dma);
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) continue;
+ /*Reset E (Chanel Enablne) bit of DMAC_CxCFG reg*/
+ flags = claim_dma_lock();
+ nmdk_dbg("Channel %d Suspended on pipe %p", channel, (void *)dmaconfig_pipeadr(dma));
+ if (p_dmach_reg->cfg & NMDK_DMACH_ENABLE) {
+ p_dmach_reg->cfg |= NMDK_DMACH_HALT;
+ }
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_SUSPENDED;
+
+ dma++;
+ }
+ return;
+ }
+ if (!(socdat->dma_chan)) goto inactive_dma;
+ dma += channel;
+ if (!dma->lock)
+ goto free_dma;
+
+ if (NMDK_DMA_SUSPENDED == dma->state) return;
+ p_dmach_reg = (struct dmach_register *)dmaconfig_pipeadr(dma);
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) return;
+ /*Reset E (Chanel Enablne) bit of DMAC_CxCFG reg*/
+ flags = claim_dma_lock();
+ nmdk_dbg("Channel %d Suspended on pipe %08x", channel, (u32)dmaconfig_pipeadr(dma));
+ if (p_dmach_reg->cfg & NMDK_DMACH_ENABLE) {
+ p_dmach_reg->cfg |= NMDK_DMACH_HALT;
+ }
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_SUSPENDED;
+ return;
+
+free_dma:
+ printk(KERN_ERR "dma%d: trying to suspend free DMA\n", channel);
+ BUG();
+ return;
+inactive_dma:
+ printk(KERN_ERR "dma driver not active\n");
+ BUG();
+}
+EXPORT_SYMBOL(suspend_dma);
+
+
+/**
+ * nomadik_dma_residue - low level method for get_dma_residue API
+ * @channel: DMA channel number
+ * @dma: DMA channel data structure pointer
+ *
+ * Pause the channel, read the control register, resume the channel
+ * May not be an accurate value
+ * returns bytes remaining on a transfer
+ */
+static int nomadik_dma_residue(dmach_t channel, dma_t *dma)
+{
+ volatile unsigned int r = 0;
+ volatile struct dmach_register *p_dmach_reg =
+ (struct dmach_register *)dmaconfig_pipeadr(dma);
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) return -1;
+ suspend_dma(channel);
+ mb();
+
+ /*get transfer bytes = src_width * transfer_size */
+ r = p_dmach_reg->cr & 0x0fff;
+ r *= ((p_dmach_reg->cr & 0x000c0000)>>17);
+ mb();
+ resume_dma(channel);
+
+ return r;
+}
+
+/**
+ * resume_dma - Resume already suspended DMA transfer for this channel
+ * @channel: DMA channel number
+ *
+ * This API will resume current dma if it is suspended previously
+ * also this API is used to resume all active and paused DMA channels involved
+ * with memory transfer by passing DMA_ALL_MEM_CHANNELS as an argument
+ */
+void resume_dma(dmach_t channel)
+{
+ dma_t *dma;
+ volatile struct dmach_register *p_dmach_reg;
+ unsigned long flags;
+
+ nmdk_dbg_ftrace();
+ if (!(socdat->dma_chan)) goto inactive_dma;
+ dma = socdat->dma_chan;
+ if (DMA_ALL_MEM_CHANNELS == channel) {
+ for (channel=0; channel< MAX_DMA_CHANNELS; channel++) {
+ if (!dma->lock) continue;
+ if (NMDK_DMA_SUSPENDED != dma->state) continue;
+ if (((u32)dmaconfig_mode(dma)&PERIPH_TO_PERIPH)
+ == PERIPH_TO_PERIPH) continue;
+ p_dmach_reg = (struct dmach_register *)dmaconfig_pipeadr(dma);
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) continue;
+ /*Reset E (Chanel Enablne) bit of DMAC_CxCFG reg*/
+ flags = claim_dma_lock();
+ if (p_dmach_reg->cfg & NMDK_DMACH_ENABLE) {
+ p_dmach_reg->cfg &= (u32)~(NMDK_DMACH_HALT);
+ }
+ nmdk_dbg("Channel %d Resumed on pipe %08x", channel, (u32)dmaconfig_pipeadr(dma));
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_RESUMED;
+
+ }
+ return;
+ }
+ dma += channel;
+ if (!dma->lock)
+ goto free_dma;
+
+ if (NMDK_DMA_SUSPENDED != dma->state) return;
+ p_dmach_reg = (struct dmach_register *)dmaconfig_pipeadr(dma);
+
+ if ((p_dmach_reg == NULL) || p_dmach_reg == (void *)0xffffffff) return;
+ /*Reset E (Chanel Enablne) bit of DMAC_CxCFG reg*/
+ flags = claim_dma_lock();
+ if (p_dmach_reg->cfg & NMDK_DMACH_ENABLE) {
+ p_dmach_reg->cfg &= (u32)~(NMDK_DMACH_HALT);
+ }
+ nmdk_dbg("Channel %d Resumed on pipe %08x", channel, (u32)dmaconfig_pipeadr(dma));
+ release_dma_lock(flags);
+ dma->state = NMDK_DMA_RESUMED;
+ return;
+
+free_dma:
+ printk(KERN_ERR "dma%d: trying to resume free DMA\n", channel);
+ BUG();
+ return;
+inactive_dma:
+ printk(KERN_ERR "dma driver not active\n");
+ BUG();
+}
+EXPORT_SYMBOL(resume_dma);
+
+/**
+ * nomadik_dma_set_destadr - low level method for set_dma_speed API
+ * @channel: DMA channel number
+ * @dma: DMA channel data structure pointer
+ * @cycle: sonsidered as destination DMA address
+ *
+ * Since ther is no API to program destination DMA address.
+ * set_dma_speed is used to fulfill this need.
+ * the function returnes the cycle which finally programs dma->spped
+ * with destination DMA address for nomadik platform
+ */
+static int nomadik_dma_set_destadr(dmach_t channel, dma_t *dma, int cycle)
+{
+ /*Speed is used to store destination address*/
+ return (cycle);
+}
+
+/**
+ * nomadik_dma_interrupt - Interrupt handler for DMA controller
+ * @irq: interrupt request number
+ * @desc: irq structure pointer
+ *
+ * checks and find out the source DMA channel who generated interrupt
+ * if interrupt generated is Terminal count then
+ * process the DMA chanel irq associated with a pipe
+ * if interrupt generated is Bus_error then
+ * just acknowledge it.
+ * free processed transfer lli and schedule the queue
+ */
+static void nomadik_dma_interrupt(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
+{
+ u32 mask;
+ volatile struct dma_register *p_dma_reg = (struct dma_register *)desc->chip_data;
+ volatile struct dmach_register *p_dmach_reg;
+ struct dma_struct *di_dmachan;
+ do {
+ p_dmach_reg = &p_dma_reg->dmach[0];
+ nmdk_dbg2("dhach addr = %p", p_dmach_reg);
+ for (mask = 1; mask != 0x100; mask=mask<<1) {
+ if (p_dma_reg->mis & mask) {
+ /* To wait for the physical Channel to get disabled(otherwise it may
+ cause Virtual/Spurious Interrupts) */
+ while (nomadik_dmach_is_active_n_enabled(p_dmach_reg->cfg)) ;
+ if (p_dma_reg->tcmis & mask) {
+ p_dma_reg->tcicr |= mask;
+ irq = nomadik_dma_channel_of_pipe((void *)p_dmach_reg);
+ if (irq != 0) {
+ desc = socdat->dirqdesc + irq;
+ di_dmachan = socdat->dma_chan + DMACH_FOR_IRQNO(irq);
+ /*handle dmachanel interrupt callback*/
+ nmdk_dbg3("ch%d tc intr", DMACH_FOR_IRQNO(irq));
+ /*flag upper layer to that requested dma is complete*/
+ if (di_dmachan->active) di_dmachan->active = 0;
+ desc_handle_irq(irq, desc);
+ /*free lli of processed request and schedule if any request in queue*/
+ nomadik_dma_free_procesed_pipe(p_dmach_reg);
+ }
+ }
+ if (p_dma_reg->emis & mask) {
+ p_dma_reg->eicr |= mask;
+ nmdk_error("Intr buserr for pipe %08x", (u32)p_dmach_reg);
+ nomadik_dma_free_procesed_pipe(p_dmach_reg);
+ }
+ }
+ p_dmach_reg++;
+ }
+ } while (p_dma_reg->mis != 0);
+ nmdk_dbg2("intr exit");
+}
+
+struct dma_ops nomadik_dma_ops = {
+ .type = "DMACH:",
+ .request = nomadik_dma_req,
+ .free = nomadik_dma_fr,
+ .enable = nomadik_dma_en,
+ .disable = nomadik_dma_dis,
+ .setspeed = nomadik_dma_set_destadr,
+ .residue = nomadik_dma_residue,
+};
+
+/**
+ * nomadik_dma_probe - driver probe function
+ *
+ * checks platfom_data is programmed properly
+ * ioremaps the DMAC register and updates pointer
+ * sets DMAC irq handler
+ * allocates memory for lli pool
+ * configures DMA channels and DMA channel interrupts
+ */
+static int nomadik_dma_probe(struct amba_device *dev, void *data)
+{
+ int i, ret;
+ uint8 dmac;
+ struct irq_desc *dirq_desc;
+ struct dma_struct *dmachan, *dmachan_temp;
+ volatile struct dma_register *p_dma_reg;
+ struct irqchip *p_dirqchip;
+
+ nmdk_dbg_ftrace();
+
+ /* findout dma controller number*/
+ if (IRQ_DMA0 == dev->irq[0]) dmac = 0;
+ else if (IRQ_DMA1 == dev->irq[0]) dmac = 1;
+ else {
+ nmdk_error("invalid dma device");
+ ret = -EINVAL;
+ goto res_out;
+ }
+
+ if (! dev->dev.platform_data) {
+ nmdk_error("platform specific data no initialized for DMAC%d", dmac);
+ ret = -ENOMEM;
+ goto res_out;
+ }
+/* ret = amba_request_regions(dev, NULL);
+ if (ret)
+ goto out;
+ */
+ p_dma_reg = (void __iomem *)
+ ioremap((int)dev->res.start, SZ_4K);
+ if (!p_dma_reg) {
+ nmdk_error("ioremap failed for DMAC%d", dmac);
+ ret = -ENOMEM;
+ goto res_out;
+ }
+ nmdk_dbg("dma_erg prt = %p irq %d", p_dma_reg,dev->irq[0] );
+ socdat = (struct dma_soc_data *)dev->dev.platform_data;
+ dmachan = (struct dma_struct *)socdat->dma_chan;
+ dirq_desc = socdat->dirqdesc;
+ p_dirqchip = socdat->dirqchip;
+ dirq_desc[dev->irq[0]].chip_data = (void *)p_dma_reg;
+
+ memset((void *)p_dma_reg, 0, sizeof(struct dma_register)); /*init h/w register to zero*/
+#ifdef __STN_8810
+#if (__STN_8810 == 10)
+ p_dma_reg->cr = 0x01; /*enable DMa controller */
+#endif
+#endif
+
+ set_irq_chained_handler(dev->irq[0], (void *)nomadik_dma_interrupt);
+
+ if (!(dmac)) {
+
+ lli_ptr_log = (struct dmach_lli *)dma_alloc_coherent(NULL,
+ MAX_DMA_LLIS * (sizeof(struct dmach_lli)),
+ (dma_addr_t *) &lli_ptr_phy,
+ GFP_DMA | GFP_ATOMIC);
+ if (lli_ptr_log <= 0) {
+ nmdk_error("unable to request mem for llis");
+ ret = -1;
+ goto bad_dev;
+ }
+ nmdk_info("chanel lli physical adr(%08x) logical adr(%08x)", (u32)lli_ptr_phy, (u32)lli_ptr_log);
+ dmachan_temp = dmachan;
+ /* dma chanel irq initialization */
+ for (i = (MAX_DMA_IRQ-MAX_DMA_CHANNELS); i < MAX_DMA_IRQ; i++) {
+ /*set_irq_chip(i, &nomadik_dma_chip);*/
+ set_irq_handler(i, handle_simple_irq);
+ set_irq_flags(i, IRQF_VALID);
+ socdat->dirqdesc[i].chip_data= NULL; //&p_dma_reg->dmach[ret];
+ if (i < MAX_DMA_CHANNELS) p_lli_pipe[DMACH_FOR_IRQNO(i)] = NULL;
+ /* dma chanel data structure initialization */
+ dmachan[DMACH_FOR_IRQNO(i)].d_ops = &nomadik_dma_ops;
+ dmachan[DMACH_FOR_IRQNO(i)].dma_irq = i;
+
+ }
+ }
+ nmdk_info("DMA%d Module initialized Ver("DMA_VER")",dmac);
+ return (0);
+
+bad_dev:
+ iounmap(p_dma_reg);
+res_out:
+ return (ret);
+}
+
+/**
+ * nomadik_dma_remove - driver remove function
+ *
+ * resets DMA channels and DMA channel interrupts configureation
+ * deallocates memory for lli pool
+ * resets DMAC irq handler
+ * frees ioremapped memory
+ */
+static int nomadik_dma_remove(struct amba_device *dev)
+{
+ uint8 dmac;
+ int i;
+ struct irq_desc *dirq_desc;
+ struct dma_struct *dma_chan;
+ volatile struct dma_register *p_dma_reg;
+ struct irqchip *p_dirqchip;
+
+ nmdk_dbg_ftrace();
+
+ /* findout dma controller number*/
+ if (IRQ_DMA0 == dev->irq[0]) dmac = 0;
+ else if (IRQ_DMA1 == dev->irq[0]) dmac = 1;
+ else {
+ nmdk_error("invalide dma device");
+ return(-EINVAL);
+ }
+ socdat = dev->dev.platform_data;
+ dma_chan = (struct dma_struct *)socdat->dma_chan;
+ dirq_desc = socdat->dirqdesc;
+ p_dma_reg = dirq_desc[dev->irq[0]].chip_data;
+
+ p_dirqchip = socdat->dirqchip;
+ if (!(dmac)) {
+ for (i = (MAX_DMA_IRQ-MAX_DMA_CHANNELS); i < MAX_DMA_IRQ; i++) {
+ //set_irq_chip(i, 0x00);
+ set_irq_handler(i, handle_bad_irq);
+ dma_chan[DMACH_FOR_IRQNO(i)].d_ops = NULL;
+ }
+ }
+
+ set_irq_handler(dev->irq[0], handle_bad_irq);
+
+ dma_free_coherent(NULL,
+ ((MAX_DMA_CHANNELS*(sizeof(struct dmach_lli))*8)+256),
+ (void *)lli_ptr_log, (dma_addr_t)lli_ptr_phy );
+ lli_ptr_phy = lli_ptr_log = NULL;
+
+ iounmap(p_dma_reg);
+ dirq_desc[dev->irq[0]].chip_data = 0x00;
+ /*amba_release_regions(dev);*/
+
+ nmdk_info("Module removed");
+ return 0;
+}
+
+static struct amba_id nomadik_dma_dev_ids[] __initdata = {
+ {
+ .id = DMA_PER_ID,
+ .mask = DMA_PER_MASK,
+ },
+ {0, 0},
+};
+
+static struct amba_driver dma_driver = {
+ .drv = {
+ .name = "DMA",
+ },
+ .id_table = nomadik_dma_dev_ids,
+ .probe = nomadik_dma_probe,
+ .remove = nomadik_dma_remove
+};
+
+static int __init nomadik_dma_init(void)
+{
+ return amba_driver_register(&dma_driver);
+}
+
+static void __exit nomadik_dma_exit(void)
+{
+ amba_driver_unregister(&dma_driver);
+}
+
+module_init(nomadik_dma_init);
+module_exit(nomadik_dma_exit);
+
+/* Module parameters */
+
+MODULE_AUTHOR("ST Microelectronics");
+MODULE_DESCRIPTION("Nomadik DMA Controllers (0 and 1)");
+MODULE_LICENSE("GPL");
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/fsmc.c
@@ -0,0 +1,113 @@
+/*
+ * linux/arch/arm/mach-nomadik/fsmc.c
+ *
+ * Copyright (C) STMicroelectronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+struct fsmc_nomadik_info {
+ unsigned char __iomem *fsmc_reg;
+};
+
+static int nomadik_fsmc_probe(struct platform_device *pdev)
+{
+ struct fsmc_platform_data *pdata = pdev->dev.platform_data;
+ struct fsmc_nomadik_info *data = NULL;
+ struct resource *res = NULL;
+ if (!pdata->init) {
+ printk("FSMC ::: platform init() function is not present\n");
+ return (-1);
+ }
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+ data = kzalloc(sizeof(struct fsmc_nomadik_info), GFP_KERNEL);
+ data->fsmc_reg = ioremap(res->start, res->end - res->start + 1);
+ platform_set_drvdata(pdev, data);
+
+ /*do platform specific fsmc init */
+ return (pdata->init());
+}
+
+/*
+ * Clean up routine
+ */
+static int nomadik_fsmc_remove(struct platform_device *pdev)
+{
+ struct fsmc_nomadik_info *data = NULL;
+
+ data = platform_get_drvdata(pdev);
+ if(data){
+ iounmap(data->fsmc_reg);
+ kfree(data);
+ }
+ return 0;
+}
+
+#ifdef CONFIG_PM
+
+#define FSMC_REG_SIZE 0x78
+static char vect_fsmc[FSMC_REG_SIZE];
+int nomadik_fsmc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct fsmc_nomadik_info *data = platform_get_drvdata(pdev);
+ printk("nomadik_fsmc_suspend: called......\n");
+ memcpy(vect_fsmc, data->fsmc_reg, FSMC_REG_SIZE);
+ return 0;
+}
+
+int nomadik_fsmc_resume(struct platform_device *pdev)
+{
+ struct fsmc_nomadik_info *data = platform_get_drvdata(pdev);
+ printk("nomadik_fsmc_resume: called......\n");
+ memcpy(data->fsmc_reg, vect_fsmc, FSMC_REG_SIZE);
+
+ return 0;
+}
+
+#else
+#define nomadik_fsmc_suspend NULL
+#define nomadik_fsmc_resume NULL
+
+#endif
+
+static struct platform_driver nomadik_fsmc_driver = {
+ .probe = nomadik_fsmc_probe,
+ .remove = nomadik_fsmc_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "NOMADIK-FSMC",
+ },
+ .suspend = nomadik_fsmc_suspend,
+ .resume = nomadik_fsmc_resume,
+};
+
+static int __init nomadik_fsmc_init(void)
+{
+ return platform_driver_register(&nomadik_fsmc_driver);
+}
+
+module_init(nomadik_fsmc_init);
+static void __exit nomadik_fsmc_exit(void)
+{
+ platform_driver_unregister(&nomadik_fsmc_driver);
+ return;
+}
+
+module_exit(nomadik_fsmc_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("ST Microelectronics (sachin.verma@st.com)");
+MODULE_DESCRIPTION("FSMC driver for Nomadik Platform");
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/gpio.c
@@ -0,0 +1,916 @@
+/*
+ * linux/arch/arm/mach-nomadik/gpio.c
+ *
+ * Copyright (C) STMicroelectronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#define GPIO_VER "2.1.0"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define GPIO_NAME "GPIO"
+
+#ifndef GPIO_DEBUG
+#define GPIO_DEBUG 0
+#endif
+
+#define NMDK_DEBUG GPIO_DEBUG /* enables/disables nmdk_dbg msgs */
+#define NMDK_DEBUG_PFX GPIO_NAME /* msg header represents this module */
+#define NMDK_DBG KERN_ERR /* message level */
+
+const char *gpio_block_name[4] = {
+ "GPIO_Block0", "GPIO_Block1", "GPIO_Block2", "GPIO_Block3",
+};
+
+static spinlock_t altfun_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t pinconf_lock = SPIN_LOCK_UNLOCKED;
+static struct gpio_soc *socdat = NULL; /*soc specific data ptr */
+extern struct irq_desc irq_desc[]; /* maintain interrupt info */
+
+#define CHK_VALID_CALL if (! socdat) { \
+ nmdk_error("called %s before initilization", __FUNCTION__); \
+ return(-EINVAL); \
+ }
+
+#define CHK_VALID_PIN(pin) if (irq_desc[IRQNO_GPIO(pin)].action) {\
+ nmdk_error("%s failed, gpio%d used by irq %d", __FUNCTION__, pin , IRQNO_GPIO(pin));\
+ return -EINVAL;\
+ }
+
+static char *nomadik_gpio_owner(gpio_pin pin_id)
+{
+ if (irq_desc[IRQNO_GPIO(pin_id)].action) {
+ return (char *)irq_desc[IRQNO_GPIO(pin_id)].action->name;
+ }
+ if (irq_desc[IRQNO_GPIO(pin_id)].chip_data) {
+ return (char *)irq_desc[IRQNO_GPIO(pin_id)].chip_data;
+ }
+ return (0);
+}
+
+/**
+ * nomadik_gpio_chkwr_permission - checks pin permission for write operation
+ */
+static int nomadik_gpio_chkwr_permission(gpio_pin pin_id, char *dev_name)
+{
+ char *pin_owner = nomadik_gpio_owner(pin_id);
+ if (!pin_owner) {
+ nmdk_error("pin %d not configured", pin_id);
+ return -1;
+ }
+ if (pin_owner != dev_name)
+ if (!strcmp(pin_owner, dev_name)) {
+ nmdk_error("pin %d not owned by %s", pin_id, dev_name);
+ return -1;
+ }
+ if (irq_desc[IRQNO_GPIO(pin_id)].action) {
+ nmdk_error("pin %d used as irq cannot be written", pin_id);
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Static Function declarations
+ */
+static gpio_error gpio_setpinconfig(gpio_pin pin_id, gpio_config * config)
+{
+ unsigned long flags;
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PIN2BLKIRQ(pin_id));
+ uint32 mask = 1UL << (pin_id % GPIO_PINS_PER_BLOCK);
+ gpio_error gpio_error = GPIO_OK;
+
+ nmdk_dbg_ftrace();
+ spin_lock_irqsave(&pinconf_lock, flags);
+ if (config->dev_name)
+ irq_desc[IRQNO_GPIO(pin_id)].chip_data = config->dev_name;
+ else
+ irq_desc[IRQNO_GPIO(pin_id)].chip_data = "unknown";
+ spin_unlock_irqrestore(&pinconf_lock, flags);
+
+ switch (config->mode) {
+ case GPIO_ALTF_A:
+ p_gpio_register->gpio_afsa |= mask;
+ p_gpio_register->gpio_afsb &= ~mask;
+ break;
+ case GPIO_ALTF_B:
+ p_gpio_register->gpio_afsa &= ~mask;
+ p_gpio_register->gpio_afsb |= mask;
+ break;
+ case GPIO_ALTF_C:
+ p_gpio_register->gpio_afsa |= mask;
+ p_gpio_register->gpio_afsb |= mask;
+ break;
+ case GPIO_MODE_SOFTWARE:
+ p_gpio_register->gpio_afsa &= ~mask;
+ p_gpio_register->gpio_afsb &= ~mask;
+
+ switch (config->direction) {
+ case GPIO_DIR_INPUT:
+ p_gpio_register->gpio_dirc = mask;
+ break;
+ case GPIO_DIR_OUTPUT:
+ p_gpio_register->gpio_dirs = mask;
+ break;
+ case GPIO_DIR_LEAVE_UNCHANGED:
+ break;
+ default:
+ return (GPIO_INVALID_PARAMETER);
+ }
+
+ if (socdat->dbounce)
+ gpio_error =
+ socdat->dbounce(p_gpio_register, mask,
+ config->debounce,
+ config->debounce_time);
+ break;
+ case GPIO_MODE_LEAVE_UNCHANGED:
+ break;
+ default:
+ return (GPIO_INVALID_PARAMETER);
+ }
+ return (gpio_error);
+}
+
+static gpio_error gpio_resetgpiopin(gpio_pin pin_id, char *dev_name)
+{
+ unsigned long flags;
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PIN2BLKIRQ(pin_id));
+ uint32 mask = 1UL << (pin_id % GPIO_PINS_PER_BLOCK);
+ char *pin_dev_name;
+ gpio_error gpio_error = GPIO_OK;
+
+ nmdk_dbg_ftrace();
+ pin_dev_name = nomadik_gpio_owner(pin_id);
+ if (!pin_dev_name)
+ return 0;
+ if (strcmp(dev_name, pin_dev_name)) {
+ nmdk_error("Unable to free pin%d Current Owner is %s", pin_id,
+ pin_dev_name);
+ return (-1);
+ }
+ p_gpio_register->gpio_afsa &= ~mask;
+ p_gpio_register->gpio_afsb &= ~mask; /*software mode*/
+ p_gpio_register->gpio_dirc = mask; /*input dir*/
+ if (socdat->dbounce) /*disalbe debounce*/
+ gpio_error =
+ socdat->dbounce(p_gpio_register, mask,
+ GPIO_DEBOUNCE_DISABLE,
+ (gpio_debounce_time)NULL);
+ /* mark pin is freed */
+
+ spin_lock_irqsave(&pinconf_lock, flags);
+ irq_desc[IRQNO_GPIO(pin_id)].chip_data = NULL;
+ spin_unlock_irqrestore(&pinconf_lock, flags);
+ if (irq_desc[IRQNO_GPIO(pin_id)].action)
+ irq_desc[IRQNO_GPIO(pin_id)].action->name = NULL;
+ return (gpio_error);
+}
+
+gpio_config altfun_pinconfig;
+static gpio_error gpio_altfunction(gpio_alt_function alt_func,
+ int which_altfunc, char *dev_name)
+{
+ struct gpio_altfun_data *altfun_table = socdat->altfun_tbl;
+ int max_altfun = socdat->sz_altfun_tbl;
+ int i, j, start, end;
+ unsigned long flags;
+ u8 check_pins = 1; /*first check availability of all gpio pins */
+ gpio_error error = -1;
+
+ nmdk_dbg_ftrace();
+ spin_lock_irqsave(&altfun_lock, flags);
+ for (i = 0; i < max_altfun; i++) {
+ if (altfun_table[i].altfun != alt_func)
+ continue;
+ start = altfun_table[i].start;
+ end = altfun_table[i].end;
+ if (start > end) {
+ j = start;
+ start = end;
+ end = j;
+ }
+ if (end > GPIO_TOTAL_PINS) {
+ nmdk_error("range upto pin%d not suported", end);
+ error = GPIO_INVALID_PARAMETER;
+ goto exit_altfunc;
+ }
+ for (j = start; j <= end; j++) {
+ if (check_pins) {
+ if (nomadik_gpio_owner(j) &&
+ (which_altfunc != GPIO_ALTF_DISABLE)) {
+ nmdk_error("pin%d not free", j);
+ error = -1;
+ goto exit_altfunc;
+ }
+ if (!nomadik_gpio_owner(j) &&
+ (which_altfunc == GPIO_ALTF_DISABLE)) {
+ nmdk_error
+ ("Trying to disable free pin%d", j);
+ error = -1;
+ goto exit_altfunc;
+ }
+ } else {
+ if (which_altfunc == GPIO_ALTF_FIND) {
+ altfun_pinconfig.mode =
+ altfun_table[i].type;
+ } else {
+ altfun_pinconfig.mode = which_altfunc;
+ }
+ altfun_pinconfig.direction = GPIO_DIR_OUTPUT;
+ altfun_pinconfig.debounce =
+ GPIO_DEBOUNCE_DISABLE;
+ altfun_pinconfig.dev_name = dev_name;
+
+ if (which_altfunc != GPIO_ALTF_DISABLE) {
+ error =
+ gpio_setpinconfig(j,
+ &altfun_pinconfig);
+ } else {
+ error = gpio_resetgpiopin(j, dev_name);
+ }
+ if (!error)
+ continue;
+ nmdk_error
+ ("GPIO %d configuration failure (nmdk_error:%d)",
+ j, error);
+ error = GPIO_INVALID_PARAMETER;
+ goto exit_altfunc;
+ }
+ }
+ if (altfun_table[i].cont == 0) {
+ /*schedule to configure if check sucessfull */
+ if (check_pins) {
+ check_pins = 0;
+ i = -1;
+ } else {
+ error = 0;
+ goto exit_altfunc;
+ }
+ }
+ }
+ exit_altfunc:
+ spin_unlock_irqrestore(&altfun_lock, flags);
+ return (error);
+}
+
+/**
+ * exported functions for other drives
+ */
+
+/*
+ * Get gpio list for /proc/gpio
+ */
+int get_gpio_list(char *buf)
+{
+ struct gpio_register *p_gpio_register;
+ uint32 mask;
+ char *p = buf;
+ char *gpiofunc;
+ char *gpio_client;
+ int i;
+
+ CHK_VALID_CALL;
+ p += sprintf(p, "Pin: %s\t%s\n", "mode", "client");
+ for (i = 0; i < GPIO_TOTAL_PINS; i++) {
+ gpio_client = nomadik_gpio_owner(i);
+ if (gpio_client) {
+ p_gpio_register = (struct gpio_register *)
+ get_irq_chip_data(GPIO_PIN2BLKIRQ(i));
+ mask = 1UL << (i % GPIO_PINS_PER_BLOCK);
+ if (irq_desc[IRQNO_GPIO(i)].action)
+ gpiofunc = "Irq";
+ else if ((p_gpio_register->gpio_afsa & mask)
+ && (p_gpio_register->gpio_afsb & mask))
+ gpiofunc = "AltFun_C";
+ else if ((p_gpio_register->gpio_afsa & mask)
+ && !(p_gpio_register->gpio_afsb & mask))
+ gpiofunc = "AltFun_A";
+ else if (!(p_gpio_register->gpio_afsa & mask)
+ && (p_gpio_register->gpio_afsb & mask))
+ gpiofunc = "AltFun_B";
+ else
+ gpiofunc = "I/O";
+ p += sprintf(p, "%3d: %s\t%s\n", i,
+ gpiofunc, gpio_client);
+ }
+ }
+ return p - buf;
+}
+
+int nomadik_gpio_resetpinconfig(gpio_pin pin_id, char *dev_name)
+{
+ int error = 0;
+
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ CHK_VALID_PIN(pin_id);
+
+ if (0 != nomadik_gpio_owner(pin_id))
+ error = gpio_resetgpiopin(pin_id, dev_name);
+ return (error);
+}
+
+int nomadik_gpio_setpinconfig(gpio_pin pin_id, gpio_config * pin_config)
+{
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ CHK_VALID_PIN(pin_id);
+ if (!irq_desc[IRQNO_GPIO(pin_id)].action) {
+ if (nomadik_gpio_owner(pin_id)) {
+ nmdk_error("pin%d not available.. aquired by %s client",
+ pin_id, nomadik_gpio_owner(pin_id));
+ return -1;
+ }
+ return (gpio_setpinconfig(pin_id, pin_config));
+ } else {
+ nmdk_error("Cannot set gpio%d used by irq %d", pin_id,
+ IRQNO_GPIO(pin_id));
+ return -1;
+ }
+ return 0;
+}
+
+int nomadik_gpio_writepin(gpio_pin pin_id, gpio_data value, char *dev_name)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PIN2BLKIRQ(pin_id));
+ uint32 mask = 1UL << (pin_id % GPIO_PINS_PER_BLOCK);
+
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ CHK_VALID_PIN(pin_id);
+ if (nomadik_gpio_chkwr_permission(pin_id, dev_name)) return -1;
+ switch (value) {
+ case GPIO_DATA_HIGH:
+ p_gpio_register->gpio_dats = mask;
+ break;
+ case GPIO_DATA_LOW:
+ p_gpio_register->gpio_datc = mask;
+ break;
+ default:
+ nmdk_error("Invalid value passed in %s", __FUNCTION__);
+ return GPIO_INVALID_PARAMETER;
+ }
+ return GPIO_OK;
+}
+
+int nomadik_gpio_readpin(gpio_pin pin_id, gpio_data * p_value)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PIN2BLKIRQ(pin_id));
+ uint32 mask = 1UL << (pin_id % GPIO_PINS_PER_BLOCK);
+
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ if ((p_gpio_register->gpio_dat & mask) != GPIO_ALL_ZERO) {
+ *p_value = GPIO_DATA_HIGH;
+ } else {
+ *p_value = GPIO_DATA_LOW;
+ }
+ return GPIO_OK;
+}
+
+int nomadik_gpio_readblock(gpio_block_id block_id, uint32 * p_value,
+ uint32 mask)
+{
+ struct gpio_register *p_gpio_register;
+
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ if (GPIO_BLOCK_16_BITS_112_TO_123 < block_id)
+ return GPIO_INVALID_PARAMETER;
+
+ if (GPIO_BLOCK_16_BITS_0_TO_15 > block_id) {
+ p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(block_id -
+ GPIO_BLOCK_32_BITS_0_TO_31
+ + IRQ_GPIO0);
+ *p_value = p_gpio_register->gpio_dat & (mask & GPIO_32BIT_MASK);
+
+ } else {
+ p_gpio_register = (struct gpio_register *)
+ get_irq_chip_data((block_id -
+ GPIO_BLOCK_16_BITS_0_TO_15) / 4 +
+ IRQ_GPIO0);
+ switch ((block_id - GPIO_BLOCK_16_BITS_0_TO_15) & 0x03) {
+ case 0:
+ *p_value =
+ (p_gpio_register->gpio_dat & (mask & 0x0000ffff));
+ break;
+ case 1:
+ *p_value =
+ (p_gpio_register->
+ gpio_dat & (mask & 0x00ffff00)) >> GPIO_SHIFT8;
+ break;
+ case 2:
+ *p_value =
+ (p_gpio_register->
+ gpio_dat & (mask & 0xffff0000)) >> GPIO_SHIFT16;
+ break;
+ case 3:
+ *p_value =
+ (p_gpio_register->
+ gpio_dat & (mask & 0xff000000)) >> GPIO_SHIFT24;
+ p_gpio_register += SZ_4K; /* point next bank */
+ *p_value |=
+ (p_gpio_register->
+ gpio_dat & (mask & 0x000000ff)) << GPIO_SHIFT8;
+ break;
+ }
+ }
+ return (GPIO_OK);
+}
+
+int nomadik_gpio_writeblock(gpio_block_id block_id, uint32 p_value, uint32 mask, char *dev_name)
+{
+ struct gpio_register *p_gpio_register;
+ int i, bankno, testmask;
+
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ if (GPIO_BLOCK_16_BITS_112_TO_123 < block_id)
+ return GPIO_INVALID_PARAMETER;
+
+ if (GPIO_BLOCK_16_BITS_0_TO_15 > block_id) {
+ bankno = block_id * GPIO_PINS_PER_BLOCK;
+ testmask = 0x01;
+ for (i = bankno; i < (bankno + GPIO_PINS_PER_BLOCK); i++) {
+ if ((mask & testmask) &&
+ (!nomadik_gpio_chkwr_permission(i, dev_name))){
+ return -1;
+ }
+ testmask = 1UL << i;
+ }
+
+ p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(block_id -
+ GPIO_BLOCK_32_BITS_0_TO_31
+ + IRQ_GPIO0);
+ p_gpio_register->gpio_datc =
+ ~(p_value & (mask & GPIO_32BIT_MASK));
+ p_gpio_register->gpio_dats = p_value & (mask & GPIO_32BIT_MASK);
+
+ } else {
+ bankno = (block_id - GPIO_BLOCK_16_BITS_0_TO_15) * 8;
+ testmask = 0x01;
+ for (i = bankno; i < (bankno + (GPIO_PINS_PER_BLOCK / 2)); i++) {
+ if ((mask & testmask) &&
+ (!nomadik_gpio_chkwr_permission(i, dev_name))){
+ return -1;
+ }
+ testmask = 1UL << i;
+ }
+ p_gpio_register = (struct gpio_register *)
+ get_irq_chip_data((block_id -
+ GPIO_BLOCK_16_BITS_0_TO_15) / 4 +
+ IRQ_GPIO0);
+ switch ((block_id - GPIO_BLOCK_16_BITS_0_TO_15) & 0x03) {
+ case 0:
+ p_gpio_register->gpio_datc =
+ ~(p_value & (mask & 0x0000ffff));
+ p_gpio_register->gpio_dats =
+ p_value & (mask & 0x0000ffff);
+ break;
+ case 1:
+ p_gpio_register->gpio_datc =
+ ~(((p_value & mask) << GPIO_SHIFT8) & 0x00ffff00);
+ p_gpio_register->gpio_dats =
+ (((p_value & mask) << GPIO_SHIFT8) & 0x00ffff00);
+ break;
+ case 2:
+ p_gpio_register->gpio_datc =
+ ~(((p_value & mask) << GPIO_SHIFT16) & 0xffff0000);
+ p_gpio_register->gpio_dats =
+ (((p_value & mask) << GPIO_SHIFT16) & 0xffff0000);
+ break;
+ case 3:
+ p_gpio_register->gpio_datc =
+ ~(((p_value & mask) << GPIO_SHIFT24) & 0xff000000);
+ p_gpio_register->gpio_dats =
+ (((p_value & mask) << GPIO_SHIFT24) & 0xff000000);
+ p_gpio_register += SZ_4K; /* point next bank */
+ p_gpio_register->gpio_datc =
+ ~(p_value & (mask & 0x000000ff));
+ p_gpio_register->gpio_dats =
+ p_value & (mask & 0x000000ff);
+ break;
+ }
+ }
+ return (GPIO_OK);
+}
+
+int nomadik_gpio_altfuncenable(gpio_alt_function altfunc, char *dev_name)
+{
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ return (int)gpio_altfunction(altfunc, GPIO_ALTF_FIND, dev_name);
+}
+
+int nomadik_gpio_altfuncdisable(gpio_alt_function altfunc, char *dev_name)
+{
+ nmdk_dbg_ftrace();
+ CHK_VALID_CALL;
+ return (int)gpio_altfunction(altfunc, GPIO_ALTF_DISABLE, dev_name);
+}
+
+EXPORT_SYMBOL(nomadik_gpio_setpinconfig);
+EXPORT_SYMBOL(nomadik_gpio_resetpinconfig);
+EXPORT_SYMBOL(nomadik_gpio_writepin);
+EXPORT_SYMBOL(nomadik_gpio_readpin);
+EXPORT_SYMBOL(nomadik_gpio_readblock);
+EXPORT_SYMBOL(nomadik_gpio_writeblock);
+EXPORT_SYMBOL(nomadik_gpio_altfuncenable);
+EXPORT_SYMBOL(nomadik_gpio_altfuncdisable);
+
+/**
+ * Interrupt handling functions
+ */
+static void nomadik_gpio_intrenable(struct gpio_register *p_gpio_register,
+ uint32 mask, uint32 type)
+{
+ if (socdat->irqen) {
+ socdat->irqen(p_gpio_register, mask, type);
+ } else {
+ nmdk_error("irqen SOC specific function not configured");
+ }
+}
+
+static void nomadik_gpio_intrdisable(struct gpio_register *p_gpio_register,
+ uint32 mask)
+{
+ if (socdat->irqdis)
+ socdat->irqdis(p_gpio_register, mask);
+ else {
+ nmdk_error("irqdis SOC specific function not configured");
+ }
+}
+/**
+ * @flag if 1 means enable, 0 means disable
+ */
+int nomadik_gpio_wakeupconfig(unsigned int irq, unsigned int flag)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PINIRQ2BLKIRQ(irq));
+ uint32 mask = 1UL << ((irq - MAX_CHIP_IRQ) % GPIO_PINS_PER_BLOCK);
+ if (flag)
+ p_gpio_register->gpio_fwimsc |= mask;
+ else
+ p_gpio_register->gpio_fwimsc &= (~mask);
+ return 0;
+}
+void nomadik_gpio_slpmreg_config(gpio_pin pin_id)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PIN2BLKIRQ(pin_id));
+ uint32 mask = 1UL << (pin_id % GPIO_PINS_PER_BLOCK);
+ p_gpio_register->gpio_slpm |= mask;
+}
+
+static void nomadik_gpio_mask(unsigned int irq)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PINIRQ2BLKIRQ(irq));
+ uint32 mask = 1UL << ((irq - MAX_CHIP_IRQ) % GPIO_PINS_PER_BLOCK);
+
+ nmdk_dbg_ftrace();
+ nomadik_gpio_intrdisable(p_gpio_register, mask);
+}
+
+static void nomadik_gpio_unmask(unsigned int irq)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PINIRQ2BLKIRQ(irq));
+ uint32 mask = 1UL << ((irq - MAX_CHIP_IRQ) % GPIO_PINS_PER_BLOCK);
+
+ nmdk_dbg_ftrace();
+ if (!irq_desc[irq].handler_data) {
+ nmdk_info
+ ("for irq%d, configuruing default type as rising edge",
+ irq);
+ irq_desc[irq].handler_data = (void *)SA_TRIGGER_RISING;
+ }
+ nomadik_gpio_intrenable(p_gpio_register, mask,
+ (uint32) irq_desc[irq].handler_data);
+}
+
+static void nomadik_gpio_intrack(unsigned int irq)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PINIRQ2BLKIRQ(irq));
+ uint32 mask = 1UL << ((irq - MAX_CHIP_IRQ) % GPIO_PINS_PER_BLOCK);
+
+ nmdk_dbg_ftrace();
+ p_gpio_register->gpio_ic = mask;
+}
+
+/*
+ * callback function for gpio specific set_irq_type sys call
+ * This function will be called in the context of request_irq also
+ */
+static int nomadik_gpio_intrsettype(unsigned int irq, unsigned int type)
+{
+ gpio_config settype_config;
+ char *client_name = nomadik_gpio_owner(GPIO_PIN_FOR_IRQ(irq));
+ int ret;
+
+ nmdk_dbg_ftrace();
+ type&=SA_TRIGGER_MASK;
+ /* mistake proofing for invalid entry incase if you try to configure
+ * gpiopin interrupt for priority/fiq
+ */
+ if ( (type == SA_TRIGGER_MASK) ||
+ (type == (SA_TRIGGER_LOW|SA_TRIGGER_HIGH|SA_TRIGGER_RISING)) ||
+ (type == (SA_TRIGGER_LOW|SA_TRIGGER_HIGH|SA_TRIGGER_FALLING)) ||
+ (type == (SA_TRIGGER_LOW|SA_TRIGGER_HIGH))) {
+ nmdk_error("Invalid IRQ type requested for irq%d", irq);
+ return -1;
+ }
+ if (!irq_desc[irq].action) {
+ nmdk_error("Trying to set type for unrequested irq%d", irq);
+ }
+ if (irq_desc[irq].handler_data) {
+ nmdk_info("irq %d type already set by %s", irq,
+ client_name);
+ return (0);
+ }
+ settype_config.mode = GPIO_MODE_SOFTWARE;
+ settype_config.direction = GPIO_DIR_INPUT;
+ settype_config.debounce = GPIO_DEBOUNCE_UNCHANGED;
+ settype_config.dev_name = client_name;
+ ret = gpio_setpinconfig(GPIO_PIN_FOR_IRQ(irq), &settype_config);
+ if (ret < 0) {
+ nmdk_error("Error in setting irq %d (err %d)", irq, ret);
+ return (ret);
+ }
+ nmdk_dbg("set_irq_type =%d", type);
+ if (type) {
+ irq_desc[irq].handler_data = (void *)(type & SA_TRIGGER_MASK);
+ } else {
+ nmdk_info
+ ("%s Configuring default irq type to SA_TRIGGER_RISING",
+ __FUNCTION__);
+ irq_desc[irq].handler_data = (void *)SA_TRIGGER_RISING;
+ }
+ if ((SA_TRIGGER_RISING == (int)irq_desc[irq].handler_data) ||
+ (SA_TRIGGER_FALLING == (int)irq_desc[irq].handler_data))
+ irq_desc[irq].handle_irq = handle_edge_irq;
+ else if ((SA_TRIGGER_LOW == (int)irq_desc[irq].handler_data) ||
+ (SA_TRIGGER_HIGH == (int)irq_desc[irq].handler_data))
+ irq_desc[irq].handle_irq = handle_level_irq;
+ /* Standard api call set_irq_handler() cannot be used from
+ the contest of set_irq_type... deadlock occures */
+
+ return (GPIO_OK);
+}
+
+/**
+ * callback function for enable_irq_wake and disable_irq_wake system calls
+ *
+ * @flag if 1 means enable, 0 means disable
+ */
+static int nomadik_gpio_intrwake(unsigned int irq, unsigned int flag)
+{
+ struct gpio_register *p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(GPIO_PINIRQ2BLKIRQ(irq));
+ uint32 mask = 1UL << ((irq - MAX_CHIP_IRQ) % GPIO_PINS_PER_BLOCK);
+ unsigned int type = (uint32) irq_desc[irq].handler_data;
+
+ if (socdat->irqwake) {
+ if (!type)
+ type = SA_TRIGGER_RISING;
+ if (!flag)
+ type = 0xff; /* to disable wakeup irq */
+ socdat->irqwake(p_gpio_register, mask, type);
+ } else {
+ nmdk_error("irqwake SOC specific function not configured");
+ return (-1);
+ }
+ return (0);
+}
+
+struct irq_chip nomadik_gpio_chip = {
+ .ack = nomadik_gpio_intrack,
+ .mask = nomadik_gpio_mask,
+ .unmask = nomadik_gpio_unmask,
+ .set_type = nomadik_gpio_intrsettype,
+ .set_wake = nomadik_gpio_intrwake,
+};
+
+static void nomadik_gpio_intr_handler(u32 irq, struct irq_desc *desc)
+{
+ struct gpio_register *p_gpio_reg =
+ (struct gpio_register *)get_irq_chip_data(irq);
+ unsigned long mis = p_gpio_reg->gpio_mis;
+
+ nmdk_dbg2("%d intr desc %p", (irq - IRQ_GPIO0), desc);
+ irq = IRQNO_GPIO((irq - IRQ_GPIO0) * GPIO_PINS_PER_BLOCK);
+ desc = irq_desc + irq;
+ while (mis) {
+ if (mis & 1) {
+ nmdk_dbg2("handling irq %d", irq);
+ desc->handle_irq(irq, desc);
+ }
+ irq++;
+ desc++;
+ mis >>= 1;
+ }
+}
+
+static int nomadik_gpio_probe(struct amba_device *dev, void *id)
+{
+ int i, ret;
+ struct gpio_register *p_gpio_register;
+
+ nmdk_dbg_ftrace();
+
+ socdat = dev->dev.platform_data;
+
+ if (!socdat) {
+ nmdk_error("platform_data struct for %s not initialized",
+ dev->dev.bus_id);
+ ret = -1;
+ goto out;
+ }
+ ret = amba_request_regions(dev, NULL);
+ if (ret)
+ goto out;
+
+ for (i = 0; i < (dev->irq[1] - dev->irq[0]); i++) {
+ set_irq_chip_data((i + dev->irq[0]),
+ (void *)ioremap((int)dev->res.start +
+ (i * SZ_4K), SZ_4K));
+
+ p_gpio_register = get_irq_chip_data(i + dev->irq[0]);
+
+ if (!p_gpio_register) {
+ ret = -ENOMEM;
+ goto res_out;
+ }
+
+ set_irq_chained_handler((i + dev->irq[0]),
+ nomadik_gpio_intr_handler);
+ }
+
+ for (i = (MAX_GPIO_IRQ - GPIO_TOTAL_PINS); i < MAX_GPIO_IRQ; i++) {
+ set_irq_chip(i, &nomadik_gpio_chip);
+ set_irq_handler(i, handle_level_irq);
+ set_irq_flags(i, IRQF_VALID);
+ set_irq_chip_data(i, NULL); /*clear gpio client name */
+ irq_desc[i].handler_data = NULL; /*clear gpio irq_type */
+ }
+
+ nmdk_info("Module initialized Ver(" GPIO_VER ")");
+ return 0;
+
+ res_out:
+ for (; 0 == i; i--) {
+ p_gpio_register = get_irq_chip_data(i + dev->irq[0]);
+
+ set_irq_handler((i + dev->irq[0]), handle_bad_irq);
+ if (p_gpio_register)
+ iounmap((void __iomem *)p_gpio_register);
+ set_irq_chip_data((i + dev->irq[0]), NULL);
+
+ }
+ amba_release_regions(dev);
+ out:
+ return (ret);
+}
+
+static int nomadik_gpio_remove(struct amba_device *dev)
+{
+ int i;
+
+ nmdk_dbg_ftrace();
+ for (i = (MAX_GPIO_IRQ - GPIO_TOTAL_PINS); i < MAX_GPIO_IRQ; i++) {
+ set_irq_chip(i, NULL);
+ set_irq_chip_data(i, NULL);
+ }
+
+ for (i = dev->irq[0]; i < dev->irq[1]; i++) {
+ set_irq_handler(i, handle_bad_irq);
+ iounmap((void __iomem *)get_irq_chip_data(i));
+ set_irq_chip_data(i, NULL);
+ }
+ amba_release_regions(dev);
+ socdat = NULL;
+ nmdk_info("Module removed");
+ return 0;
+}
+
+#if (defined CONFIG_PM && defined __STN_8815)
+static int nomadik_gpio_suspend(struct amba_device *dev, pm_message_t state)
+{
+ unsigned int i;
+ struct gpio_register *p_gpio_register;
+ struct gpio_pm_context *gpio_pm;;
+
+ nmdk_dbg_ftrace();
+ dev->dev.driver_data =
+ kmalloc(sizeof(struct gpio_pm_context) * GPIO_BLOCKS_COUNT,
+ GFP_KERNEL);
+ gpio_pm = (struct gpio_pm_context *)dev->dev.driver_data;
+ if (!gpio_pm) {
+ nmdk_error("Unable to alocate memory %s failed...",
+ __FUNCTION__);
+ }
+ for (i = 0; i < GPIO_BLOCKS_COUNT; i++) {
+ p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(i + dev->irq[0]);
+ gpio_pm[i].slpm = p_gpio_register->gpio_slpm;
+ gpio_pm[i].rwimsc = p_gpio_register->gpio_rwimsc;
+ gpio_pm[i].fwimsc = p_gpio_register->gpio_fwimsc;
+ gpio_pm[i].rimsc = p_gpio_register->gpio_rimsc;
+ gpio_pm[i].fimsc = p_gpio_register->gpio_fimsc;
+ }
+ return 0;
+}
+
+static int nomadik_gpio_resume(struct amba_device *dev)
+{
+ unsigned int i;
+ struct gpio_register *p_gpio_register;
+ struct gpio_pm_context *gpio_pm =
+ (struct gpio_pm_context *)dev->dev.driver_data;
+
+ nmdk_dbg_ftrace();
+ for (i = 0; i < GPIO_BLOCKS_COUNT; i++) {
+ p_gpio_register =
+ (struct gpio_register *)get_irq_chip_data(i + dev->irq[0]);
+ p_gpio_register->gpio_slpm = gpio_pm[i].slpm;
+ p_gpio_register->gpio_rwimsc = gpio_pm[i].rwimsc;
+ p_gpio_register->gpio_fwimsc = gpio_pm[i].fwimsc;
+ p_gpio_register->gpio_rimsc = gpio_pm[i].rimsc;
+ p_gpio_register->gpio_fimsc = gpio_pm[i].fimsc;
+ }
+ kfree(gpio_pm);
+ return 0;
+}
+#else
+#define nomadik_gpio_suspend NULL
+#define nomadik_gpio_resume NULL
+#endif
+
+static struct amba_id nomadik_gpio_ids[] = {
+ {
+ .id = GPIO_PER_ID,
+ .mask = GPIO_PER_MASK,
+ },
+ {0, 0},
+};
+
+static struct amba_driver gpio_driver = {
+ .drv = {
+ .owner = THIS_MODULE,
+ .name = "gpio",
+ },
+ .probe = nomadik_gpio_probe,
+ .remove = nomadik_gpio_remove,
+ .suspend = nomadik_gpio_suspend,
+ .resume = nomadik_gpio_resume,
+ .id_table = nomadik_gpio_ids,
+};
+
+static int __init nomadik_gpio_init(void)
+{
+ return amba_driver_register(&gpio_driver);
+}
+
+static void __exit nomadik_gpio_exit(void)
+{
+ amba_driver_unregister(&gpio_driver);
+}
+
+EXPORT_SYMBOL(nomadik_gpio_intrsettype);
+EXPORT_SYMBOL(nomadik_gpio_mask);
+EXPORT_SYMBOL(nomadik_gpio_unmask);
+
+module_init(nomadik_gpio_init);
+module_exit(nomadik_gpio_exit);
+
+MODULE_AUTHOR("Prafulla WADASKAR ");
+MODULE_DESCRIPTION("Nomadik GPIO Driver");
+MODULE_LICENSE("GPL");
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/irq.c
@@ -0,0 +1,231 @@
+/*
+ * linux/arch/arm/mach-nomadik/irq.c
+ *
+ * Copyright (C) STMicroelectronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Author : Prafulla WADASKAR
+ * Reference : Documentation/arm/STM-Nomadik/irq_usrguide.txt
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define VIC_VER "2.0.0"
+#define VIC_NAME "VIC"
+
+#ifndef VIC_DEBUG
+#define VIC_DEBUG 0
+#endif
+
+#define NMDK_DEBUG VIC_DEBUG /* enables/disables nmdk_dbg msgs */
+#define NMDK_DEBUG_PFX VIC_NAME /* msg header represents this module */
+#define NMDK_DBG KERN_ERR /* message level */
+
+struct vic_basic_registers {
+ u32 irqsr; /* IRQ Status*/
+ u32 fiqsr; /* FIQ Status*/
+ u32 ris; /* Raw Interrupt status*/
+ u32 isel; /* Interrupt select*/
+ u32 iens; /* Interrupt enable set*/
+ u32 ienc; /* Interrupt enable clear*/
+ u32 swisr; /* Software interrupt*/
+ u32 swicr; /* Software interrupt clear*/
+};
+
+struct vic_register {
+ struct vic_basic_registers bank[(MAXIRQNUM/32) +1];
+ u32 per; /* Protection enable*/
+#if defined(__STN_8815)
+ u32 reserved_1[(0x50 - 0x44) >> 2]; /* Reserved*/
+ u32 isr_var; /* ISR Vector address*/
+ u32 isr_dvar; /* ISR Default vector address*/
+ u32 reserved_2[(0x100 - 0x58) >> 2]; /* Reserved*/
+#elif defined(__STN_8810)
+ u32 reserved_1[(0x30 - 0x24) >> 2]; /* Reserved*/
+ u32 isr_var; /* ISR Vector address*/
+ u32 isr_dvar; /* ISR Default vector address*/
+ u32 reserved_2[(0x100 - 0x38) >> 2]; /* Reserved*/
+#endif
+ u32 var[VIC_VECTORED_IRQ_NUM]; /* Vector address 0-15*/
+ u32 reserved_3[(0x200 - 0x140) >> 2]; /* Reserved*/
+ u32 vcr[VIC_VECTORED_IRQ_NUM]; /* Vector control 0-15*/
+ u32 reserved_4[(0x300 - 0x240) >> 2]; /* Reserved*/
+ u32 itcr; /* Test Control register*/
+ u32 itip_1; /* Test input nVICIRQIN/nVICFIQIN*/
+ u32 itip_2; /* Test input VICVECADDRIN*/
+ u32 itop_1; /* Test output nVICIRQ/nVICFIQ*/
+ u32 itop_2; /* Test output VICVECADDROUT*/
+ u32 reserved_5[(0xFE0 - 0x314) >> 2]; /* Reserved*/
+ u32 periph_id_0; /* Peripheral id: bits 7:0*/
+ u32 periph_id_1; /* Peripheral id: bits 15:8*/
+ u32 periph_id_2; /* Peripheral id: bits 23:16*/
+ u32 periph_id_3; /* Peripheral id: bits 31:24*/
+ u32 pcell_id_0; /* PrimeCell id: bits 7:0*/
+ u32 pcell_id_1; /* PrimeCell id: bits 15:8*/
+ u32 pcell_id_2; /* PrimeCell id: bits 23:16*/
+ u32 pcell_id_3; /* PrimeCell id: bits 31:24*/
+};
+
+extern struct irq_desc irq_desc[]; /* interrupt description table */
+static volatile struct vic_register *p_vic_register =
+ (struct vic_register *)IO_ADDRESS(NOMADIK_IC_BASE);
+
+static int nomadik_vic_set_type(unsigned int irq, unsigned int type);
+static DEFINE_SPINLOCK(vic_lock);
+
+static void nomadik_vic_priority_mask(unsigned int irq)
+{
+ u8 priority_level = (u8)(((irq_desc[irq].action->flags)>>4) & 0x0f);
+ u32 mask = 1UL<vcr[priority_level] &= ~VIC_VECTORED_IRQ_EN;
+ p_vic_register->bank[irq/32].ienc |= mask;
+}
+
+static void nomadik_vic_priority_unmask(unsigned int irq)
+{
+ u8 priority_level = (u8)(((irq_desc[irq].action->flags)>>4) & 0x0f);
+ u32 mask = 1UL<vcr[priority_level] |= VIC_VECTORED_IRQ_EN;
+ p_vic_register->bank[irq/32].iens |= mask;
+ /*
+ * Write to the VIC_VAR register.
+ * This clears the respective interrupt in the internal interrupt
+ * priority hardware.
+ */
+ p_vic_register->isr_var = (u32)NULL;
+}
+
+static struct irq_chip nomadik_vic_priority_chip = {
+ .ack = nomadik_vic_priority_mask,
+ .mask = nomadik_vic_priority_mask,
+ .unmask = nomadik_vic_priority_unmask,
+ .set_type = nomadik_vic_set_type
+};
+
+static void nomadik_vic_mask(unsigned int irq)
+{
+ u32 mask = 1UL<bank[irq/32].ienc |= mask;
+}
+
+static void nomadik_vic_unmask(unsigned int irq)
+{
+ u32 mask = 1UL<bank[irq/32].iens |= mask;
+}
+
+static struct irq_chip nomadik_vic_chip = {
+ .ack = nomadik_vic_mask,
+ .mask = nomadik_vic_mask,
+ .unmask = nomadik_vic_unmask,
+ .set_type = nomadik_vic_set_type
+};
+
+/**
+ * nomadik_vic_set_type - To enable/disable/change priority logic
+ *
+ * callback function for set_irq_type sys call
+ * This function will be called in the context of request_irq.
+ * This function is used to configure the interrupt priotity requested
+ * through request_irq sytem call
+ *
+ * This function can be invoked by set_irq_type sys call ,using which
+ * you can enable/disable/change preprogrammed priority
+ *
+ * Note: this function will NOT be invoked if interrupt is requested as
+ * shared irq (i.e. SA_SHIRQ is specifed during requerst_irq),
+ */
+static int nomadik_vic_set_type(unsigned int irq, unsigned int type)
+{
+ struct irq_desc *desc;
+ struct irq_chip *vic_chip;
+ unsigned long flags;
+
+ u8 priority_level;
+
+ nmdk_dbg_ftrace();
+ if (!irq_desc[irq].action) return(-1); /*if irq not configured*/
+ /*
+ * Priority logic does not work for interrupt configured with
+ * SA_TIMER flag, hence exit if SA_TIMER flag is set for irq
+ */
+ if (irq_desc[irq].action->flags & IRQF_TIMER) return(-1);
+ if ((type & SA_NMDK_PRIORITYIRQ) != SA_NMDK_PRIORITYIRQ) return(-1);
+ /*
+ * if this function is invoked by set_irq_type call
+ * then store input type as flags
+ */
+ if (type > SA_TRIGGER_MASK) irq_desc[irq].action->flags = type;
+ /*process irq priority configuration*/
+ priority_level = (u8)(((irq_desc[irq].action->flags)>>24) & 0x0f);
+ if (p_vic_register->vcr[priority_level] & VIC_VECTORED_IRQ_EN) {
+ nmdk_info("priority change for active irq%d", irq);
+ }
+ /*configure vic for vectored priority interrupt request*/
+ p_vic_register->var[priority_level] = irq;
+ p_vic_register->vcr[priority_level] = irq;
+ /* configure appropriate chip pointer*/
+ desc = irq_desc + irq;
+ if (!priority_level) {
+ p_vic_register->vcr[priority_level] &= ~VIC_VECTORED_IRQ_EN;
+ vic_chip = &nomadik_vic_chip;
+ } else
+ vic_chip = &nomadik_vic_priority_chip;
+ spin_lock_irqsave(&vic_lock, flags);
+ desc->chip = vic_chip;
+ spin_unlock_irqrestore(&vic_lock, flags);
+
+ nmdk_info("Configured PL%2d for irq%d", priority_level, irq);
+ return (0);
+}
+
+static void nomadik_vic_configure(unsigned int irq)
+{
+ u32 mask = 1UL<bank[irq/32].isel &= ~mask;
+}
+
+void __init nomadik_vic_init(void)
+{
+ unsigned int i;
+
+ nmdk_dbg_ftrace();
+ /*force default isr value to zero*/
+ p_vic_register->isr_dvar = (u32)NULL;
+ for (i = 0; i < MAX_CHIP_IRQ; i++) {
+ if (1ULL<vcr[i] = (u32)NULL;
+ p_vic_register->var[i] = (u32)NULL;
+ }
+ }
+ nmdk_info("Module initialized Ver("VIC_VER")");
+}
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/l2cc.c
@@ -0,0 +1,152 @@
+/*
+ * linux/arch/arm/mach-nomadik/stn8815_devices.c
+ *
+ * Copyright (C) STMicroelectronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * SOC specifc drivers whcih are used as amba devices
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+#define L210_CACHE_SYNC 0x730
+#define L210_INV_LINE_PA 0x770
+#define L210_INV_WAY 0x77C
+#define L210_CLEAN_LINE_PA 0x7B0
+#define L210_CLEAN_LINE_IDX 0x7B8
+#define L210_CLEAN_WAY 0x7BC
+#define L210_CLEAN_INV_LINE_PA 0x7F0
+#define L210_CLEAN_INV_LINE_IDX 0x7F8
+#define L210_CLEAN_INV_WAY 0x7FC
+
+static void __iomem *l210_base = (void __iomem *)IO_ADDRESS(NOMADIK_L2CC_BASE);
+static unsigned long way_size = 0x4000;
+
+static inline void sync_writel(unsigned long val, unsigned long reg,
+ unsigned long complete_mask)
+{
+ writel(val, l210_base + reg);
+ /* wait for the operation to complete not required for l210 controller */
+ //while (readl(l210_base + reg) & complete_mask);
+}
+
+static inline void cache_sync(void)
+{
+ sync_writel(0, L210_CACHE_SYNC, 1);
+}
+
+static inline void cacheline_index_op(unsigned long addr, unsigned long reg)
+{
+ unsigned long way, index;
+
+ for (way = 0; way < 8; way++)
+ for (index = 0; index < way_size; index += PAGE_SIZE) {
+ unsigned long val = (way << 29) | index | (addr & (PAGE_SIZE - 1));
+ sync_writel(val, reg, 1);
+ }
+}
+
+inline void l210_inv_all(void)
+{
+ /* invalidate all ways */
+ sync_writel(0xff, L210_INV_WAY, 0xff);
+ cache_sync();
+}
+EXPORT_SYMBOL(l210_inv_all);
+
+inline void l210_clean_all(void)
+{
+ /* clean all ways */
+ sync_writel(0xff, L210_CLEAN_WAY, 0xff);
+ cache_sync();
+}
+EXPORT_SYMBOL(l210_clean_all);
+
+inline void l210_flush_all(void)
+{
+ /* clean and invalidate all ways */
+ sync_writel(0xff, L210_CLEAN_INV_WAY, 0xff);
+ cache_sync();
+}
+EXPORT_SYMBOL(l210_flush_all);
+
+void l210_inv_range(unsigned long start, unsigned long end)
+{
+ l210_inv_all();
+}
+EXPORT_SYMBOL(l210_inv_range);
+
+void l210_clean_range(unsigned long start, unsigned long end)
+{
+ unsigned long size = end - start;
+ unsigned long addr;
+
+ if (size >= PAGE_SIZE) {
+ l210_clean_all();
+ return;
+ }
+
+ /* no physical address information, flush by index/way */
+ for (addr = start & ~(32 - 1); addr < end; addr += 32)
+ cacheline_index_op(addr, L210_CLEAN_LINE_IDX);
+ cache_sync();
+}
+EXPORT_SYMBOL(l210_clean_range);
+
+
+void l210_flush_range(unsigned long start, unsigned long end)
+{
+ unsigned long addr,way,val;
+
+ //printk("\nl2 flushing hit\n");
+ /* no physical address information, flush by index/way */
+ for (addr = start & ~(32 - 1); addr < end; addr += 32)
+ cacheline_index_op(addr, L210_CLEAN_INV_LINE_IDX);
+
+ /*for (addr = start; addr < end; addr += 32) {
+ for (way = 0; way < 8; way++) {
+ //val = (way << 29) | ((addr & 0x1ff) << 5);
+ val = (way << 29) | (addr << 5);
+ sync_writel(val, L220_CLEAN_INV_LINE_IDX, 1);
+ }
+ }*/
+ cache_sync();
+}
+EXPORT_SYMBOL(l210_flush_range);
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/msp.c
@@ -0,0 +1,2062 @@
+/*
+ * Driver for Nomadik STN8810/STN8815 MSP device.
+ *
+ * Copyright 2006 STMicroelectronics Pvt. Ltd.
+ *
+ * This program is free sofstware; 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.
+ *
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+#include
+#include
+#endif
+
+#include
+
+#include "msp.h"
+
+#ifndef MSP_DEBUG
+#define MSP_DEBUG 0
+#endif
+
+#define NMDK_MSP_NAME "NOMADIK_MSP"
+
+#define NMDK_DEBUG MSP_DEBUG /* enables/disables nmdk_dbg msgs */
+#define NMDK_DEBUG_PFX NMDK_MSP_NAME /* msg header represents this module */
+#define NMDK_DBG KERN_ERR /* message level */
+
+char MSP_NAME[] = "msp";
+
+static volatile struct msp_register *registers[MSP_COUNT] = {
+ (struct msp_register *)IO_ADDRESS(NOMADIK_MSP0_BASE),
+#if MSP_COUNT > 1
+ (struct msp_register *)IO_ADDRESS(NOMADIK_MSP1_BASE),
+#endif
+#if MSP_COUNT > 2
+ (struct msp_register *)IO_ADDRESS(NOMADIK_MSP2_BASE),
+#endif
+};
+
+static int altfunc[MSP_COUNT] = {
+ GPIO_ALT_MSP_0,
+#if MSP_COUNT > 1
+ GPIO_ALT_MSP_1,
+#endif
+#if MSP_COUNT > 2
+ GPIO_ALT_MSP_2,
+#endif
+};
+static int msp_irq = IRQ_MSP0;
+
+static wait_queue_head_t wait[MSP_COUNT];
+static volatile int msp_io_error[MSP_COUNT];
+
+static struct msp_context msp_context[MSP_COUNT];
+
+static struct msp_mode_status tx_status[MSP_COUNT];
+static struct msp_mode_status rx_status[MSP_COUNT];
+
+static u32 input_clock[MSP_COUNT];
+static u32 spi_clock_mode[MSP_COUNT];
+static u32 spi_burst_mode[MSP_COUNT];
+
+/*Usage Flag for MSPs*/
+msp_flag *flag_msp0, *flag_msp1, *flag_msp2;
+
+static const struct msp_protocol_desc protocol_desc_tab[] = /* Protocol desciptors */
+{
+ I2S_PROTOCOL_DESC,
+ /* PCM_PROTOCOL_DESC */
+ {
+ MSP_SINGLE_PHASE,
+ MSP_FRAME_LENGTH_1,
+ MSP_FRAME_LENGTH_1,
+ MSP_ELEM_LENGTH_16,
+ MSP_ELEM_LENGTH_16,
+ /*below three settings are platform specific */
+ MSP_DATA_DELAY,
+ MSP_TX_CLOCK_EDGE,
+ MSP_RX_CLOCK_EDGE},
+ PCM_COMPAND_PROTOCOL_DESC,
+ AC97_PROTOCOL_DESC,
+ SPI_MASTER_PROTOCOL_DESC,
+ SPI_SLAVE_PROTOCOL_DESC
+};
+/* local functions */
+static irqreturn_t handle_irq(int irq, void *dev_id);
+static int transmit_data(int msp, void *data, size_t bytes);
+static int receive_data(int msp, void *data, size_t bytes);
+static int transmit_receive_data(int msp, int work_mode,
+ void *txdata, size_t txbytes, void *rxdata,
+ size_t rxbytes);
+static int configure_clock(int msp, int protocol, u32 input_clock,
+ u32 frame_freq, int frame_size);
+static int configure_protocol(int msp, int protocol, int direction,
+ enum msp_data_size data_size);
+
+
+/**
+ * nomadik_msp_configure - configures the MSP controller
+ * @msp - specifies the msp controller to configure.
+ * @config - specifies the configuration parameters.
+ */
+int nomadik_msp_configure(int msp, struct msp_generic_config *config, t_msp_user user)
+{
+ u32 old_reg;
+ u32 new_reg;
+ u32 mask;
+ int status = 0;
+
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+ nmdk_dbg("In nomadik_msp_configure, flag_msp0 is %d, user is %d\n", flag_msp0->user, user);
+ nmdk_dbg("In nomadik_msp_configure, flag_msp1 is %d\n", flag_msp1->user);
+ nmdk_dbg("In nomadik_msp_configure, flag_msp2 is %d\n", flag_msp2->user);
+
+ switch(msp) {
+ case 0: if((flag_msp0->user != MSP_NO_USER) && (flag_msp0->user != user)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP0 already in use in %d mode", flag_msp0->user);
+ }
+ else {
+ down(&flag_msp0->lock);
+ flag_msp0->user = user;
+ up(&flag_msp0->lock);
+ }
+ break;
+ case 1: if((flag_msp1->user != MSP_NO_USER) && (flag_msp1->user != user)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP1 already in use in %d mode", flag_msp1->user);
+ }
+ else {
+ down(&flag_msp1->lock);
+ flag_msp1->user = user;
+ up(&flag_msp1->lock);
+ }
+ break;
+ case 2: if((flag_msp2->user != MSP_NO_USER) && (flag_msp2->user != user)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP2 already in use in %d mode", flag_msp2->user);
+ }
+ else
+ down(&flag_msp2->lock);
+ flag_msp2->user = user;
+ up(&flag_msp2->lock);
+ break;
+ }
+ if(status) {
+ printk(KERN_ERR "Error in setting flag bit for MSP\n");
+ return status;
+ }
+
+ /* First do the global config register */
+ mask =
+ RX_CLK_SEL_MASK | TX_CLK_SEL_MASK | RX_FRAME_SYNC_MASK |
+ TX_FRAME_SYNC_MASK | RX_SYNC_SEL_MASK | TX_SYNC_SEL_MASK |
+ RX_FIFO_ENABLE_MASK | TX_FIFO_ENABLE_MASK | SRG_CLK_SEL_MASK;
+
+ new_reg =
+ (config->tx_clock_sel | config->rx_clock_sel | config->
+ rx_frame_sync_pol | config->tx_frame_sync_pol | config->
+ rx_frame_sync_sel | config->tx_frame_sync_sel | config->
+ rx_fifo_config | config->tx_fifo_config | config->srg_clock_sel);
+
+ old_reg = (registers[msp]->global_ctrl);
+ old_reg &= ~mask;
+ old_reg |= new_reg;
+ (registers[msp]->global_ctrl) = old_reg;
+
+ /* Now do the tx_config and rx_config registers */
+ old_reg = registers[msp]->rx_config;
+ mask = MSP_NON_MODE_BIT_MASK;
+ new_reg = config->rx_endianess | config->rx_unexpect_frame_sync;
+ old_reg &= ~mask;
+ old_reg |= new_reg;
+ (registers[msp]->rx_config) = old_reg;
+ old_reg = registers[msp]->tx_config;
+ new_reg = config->tx_endianess | config->tx_unexpect_frame_sync;
+ old_reg &= ~mask;
+ old_reg |= new_reg;
+ (registers[msp]->tx_config) = old_reg;
+
+ /* Set global input clock and spi clock mode, needed by other config ops */
+
+ input_clock[msp] = config->input_clock_freq;
+ spi_clock_mode[msp] = config->spi_clk_mode;
+ spi_burst_mode[msp] = config->spi_burst_mode;
+ return 0;
+}
+
+/**
+ * nomadik_msp_enable - Enable the msp controller with given configuration
+ * @msp - specifies the msp controller
+ * @direction - specifies the transmit/receive direction
+ * @work_mode - specifies DMA/Interrupt/Polling mode
+ * @protocol - Either PCM/I2S
+ * @frame_freq - specifies the frequency.
+ * @frame_size - specifies frame size
+ * @data_size - specifies element size
+ */
+int nomadik_msp_enable(int msp, int direction, int work_mode, int protocol,
+ int frame_freq, int frame_size,
+ enum msp_data_size data_size, t_msp_user user)
+{
+ int status = 0;
+ int skip_irq;
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+
+ nmdk_dbg("In nomadik_msp_enable, flag_msp0 is %d, user is %d\n", flag_msp0->user, user);
+ switch(msp) {
+ case 0: if(flag_msp0->user != user) {
+ status = -EINVAL;
+ printk(KERN_ERR "MSP0 not usable in Non SPI mode\n");
+ }
+ break;
+ case 1: if(flag_msp1->user != user) {
+ status = -EINVAL;
+ printk(KERN_ERR "MSP1 not usable in Non SPI mode\n");
+ }
+ break;
+ case 2: if(flag_msp2->user != user) {
+ status = -EINVAL;
+ printk(KERN_ERR "MSP2 not usable in Non SPI mode\n");
+ }
+ break;
+ }
+ if(status) {
+ printk(KERN_ERR "Error in setting flag bit for MSP, status is %d\n", status);
+ return status;
+ }
+
+ skip_irq = (registers[msp]->global_ctrl) & (TX_ENABLE | RX_ENABLE);
+
+ if(!skip_irq) {
+ switch (msp) {
+ case 0:
+ status = nomadik_gpio_altfuncenable(altfunc[msp], "MSP_0");
+ break;
+ case 1:
+ status = nomadik_gpio_altfuncenable(altfunc[msp], "MSP_1");
+ break;
+ case 2:
+ status = nomadik_gpio_altfuncenable(altfunc[msp], "MSP_2");
+ break;
+ }
+ if (status) {
+ printk(KERN_ERR "Error in nomadik_gpio_altfuncenable, status is %d\n", status);
+ return status;
+ }
+ }
+
+ /* Store context data for power management */
+ msp_context[msp].direction = direction;
+ msp_context[msp].mode = work_mode;
+ msp_context[msp].protocol = protocol;
+ msp_context[msp].frame_freq = frame_freq;
+ msp_context[msp].frame_size = frame_size;
+ msp_context[msp].requested_data_size = data_size;
+
+ /* Configure msp with protocol dependent settings */
+ configure_protocol(msp, protocol, direction, data_size);
+
+ configure_clock(msp, protocol, input_clock[msp], frame_freq,
+ frame_size);
+
+ switch (direction) {
+ case MSP_TRANSMIT_MODE:
+ registers[msp]->irq_mask |= TRANSMIT_UNDERRUN_ERR_INT;
+ if (work_mode == MSP_DMA_MODE) {
+ registers[msp]->dma_ctrl |= TX_DMA_ENABLE;
+ }
+
+ tx_status[msp].work_mode = work_mode;
+ if (protocol == MSP_I2S_PROTOCOL) {
+ tx_status[msp].stereo_mode = MSP_STEREO;
+ } else {
+ tx_status[msp].stereo_mode = MSP_MONO;
+ }
+
+ (registers[msp]->global_ctrl) &= ~RX_ENABLE;
+ (registers[msp]->global_ctrl) |= TX_ENABLE;
+ break;
+ case MSP_RECEIVE_MODE:
+ registers[msp]->irq_mask |= RECEIVE_OVERRUN_ERROR_INT;
+ if (work_mode == MSP_DMA_MODE) {
+ registers[msp]->dma_ctrl |= RX_DMA_ENABLE;
+ }
+
+ rx_status[msp].work_mode = work_mode;
+ if (protocol == MSP_I2S_PROTOCOL) {
+ rx_status[msp].stereo_mode = MSP_STEREO;
+ } else {
+ rx_status[msp].stereo_mode = MSP_MONO;
+ }
+
+ (registers[msp]->global_ctrl) |= RX_ENABLE;
+ (registers[msp]->global_ctrl) &= ~TX_ENABLE;
+ break;
+ case MSP_BOTH_T_R_MODE:
+ registers[msp]->irq_mask |=
+ TRANSMIT_UNDERRUN_ERR_INT | RECEIVE_OVERRUN_ERROR_INT;
+ if (work_mode == MSP_DMA_MODE) {
+ registers[msp]->dma_ctrl |=
+ TX_DMA_ENABLE | RX_DMA_ENABLE;
+ }
+
+ tx_status[msp].work_mode = work_mode;
+ rx_status[msp].work_mode = work_mode;
+ if (protocol == MSP_I2S_PROTOCOL) {
+ tx_status[msp].stereo_mode = MSP_STEREO;
+ rx_status[msp].stereo_mode = MSP_STEREO;
+ } else {
+ tx_status[msp].stereo_mode = MSP_MONO;
+ rx_status[msp].stereo_mode = MSP_MONO;
+ }
+
+ (registers[msp]->global_ctrl) |= RX_ENABLE;
+ (registers[msp]->global_ctrl) |= TX_ENABLE;
+ break;
+ default:
+ printk(KERN_ERR "Invalid direction parameter\n");
+ return -EINVAL;
+ }
+
+ /* enable frame generation logic */
+ (registers[msp]->global_ctrl) |= FRAME_GEN_ENABLE;
+ msp_context[msp].msp_disable = 0;
+ if (!skip_irq) {
+ status = request_irq(msp_irq, handle_irq,
+ SA_INTERRUPT | SA_SHIRQ, MSP_NAME,
+ (void *)registers[msp]);
+ if(status)
+ printk(KERN_ERR "Error while request_irq, err is %d\n", status);
+ }
+ return status;
+}
+
+void nomadik_msp_flush_input(int msp)
+{
+ u32 dummy;
+ while (!(registers[msp]->status & RX_FIFO_EMPTY)) {
+ dummy = registers[msp]->fifo;
+ }
+}
+
+int nomadik_msp_send_data(int msp, void *data, size_t bytes)
+{
+ int status;
+
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+
+ if (!((registers[msp]->global_ctrl) & TX_ENABLE)) {
+ printk(KERN_ERR
+ "Trying to transmit with transmit not enabled\n");
+ return -EPERM;
+ }
+
+ switch (tx_status[msp].work_mode) {
+ case MSP_DMA_MODE:
+ printk(KERN_WARNING "Function not authorized in DMA mode\n");
+ return -ENOSYS;
+ break;
+ case MSP_POLLING_MODE:
+ case MSP_INTERRUPT_MODE:
+ status = transmit_data(msp, data, bytes);
+ break;
+ default:
+ printk(KERN_ERR "tx work mode invalid: %d\n",
+ tx_status[msp].work_mode);
+ return -EINVAL;
+ break;
+ }
+
+ return status;
+}
+
+int nomadik_msp_receive_data(int msp, void *data, size_t bytes)
+{
+ int status;
+
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+
+ if (!((registers[msp]->global_ctrl) & RX_ENABLE)) {
+ printk(KERN_ERR "Trying to receive with receive not enabled\n");
+ return -EPERM;
+ }
+
+ switch (rx_status[msp].work_mode) {
+ case MSP_DMA_MODE:
+ printk(KERN_WARNING "Function not authorized in DMA mode\n");
+ return -ENOSYS;
+ break;
+ case MSP_POLLING_MODE:
+ case MSP_INTERRUPT_MODE:
+ status = receive_data(msp, data, bytes);
+ break;
+ default:
+ printk(KERN_ERR "rx work mode invalid: %d\n",
+ rx_status[msp].work_mode);
+ return -EINVAL;
+ break;
+ }
+
+ return status;
+}
+
+int nomadik_msp_transceive_data(int msp, void *txdata, size_t txbytes,
+ void *rxdata, size_t rxbytes)
+{
+ int status;
+
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+
+ if (!((registers[msp]->global_ctrl) & RX_ENABLE)) {
+ printk(KERN_ERR "Trying to receive with receive not enabled\n");
+ return -EPERM;
+ }
+
+ if (!((registers[msp]->global_ctrl) & TX_ENABLE)) {
+ printk(KERN_ERR
+ "Trying to transmit with transmit not enabled\n");
+ return -EPERM;
+ }
+
+ if (tx_status[msp].work_mode != rx_status[msp].work_mode) {
+ printk(KERN_ERR "Inconsistent transmit/reveive modes\n");
+ return -EINVAL;
+ }
+
+ switch (tx_status[msp].work_mode) {
+ case MSP_DMA_MODE:
+ printk(KERN_WARNING "Function not authorized in DMA mode\n");
+ return -ENOSYS;
+ break;
+ case MSP_POLLING_MODE:
+ case MSP_INTERRUPT_MODE:
+ status = transmit_receive_data(msp, tx_status[msp].work_mode,
+ txdata, txbytes,
+ rxdata, rxbytes);
+ break;
+ default:
+ printk(KERN_ERR "work mode invalid: %d\n",
+ tx_status[msp].work_mode);
+ return -EINVAL;
+ break;
+ }
+
+ return status;
+}
+
+static int nomadik_msp_wait_for_tx_complete(int msp)
+{
+ while (!(registers[msp]->status & TX_FIFO_EMPTY));
+ return 0;
+}
+
+/**
+ * nomadik_msp_disable - disable the given msp controller
+ * @msp - specifies the msp contoller
+ * @direction - specifies the transmit/receive direction
+ */
+int nomadik_msp_disable(int msp, int direction, t_msp_user user)
+{
+ int status = 0;
+ if (msp < 0 || msp > MSP_COUNT) {
+ printk(KERN_ERR "Invalid msp specified:%d\n", msp);
+ return -EINVAL;
+ }
+
+ nmdk_dbg("In nomadik_msp_disable, flag_msp0 is %d, user is %d\n", flag_msp0->user, user);
+ /*Set global flag to free state*/
+ switch(msp) {
+ case 0: if(flag_msp0->user == user) {
+ down(&flag_msp0->lock);
+ flag_msp0->user = MSP_NO_USER;
+ up(&flag_msp0->lock);
+ nmdk_dbg("Flag cleanup for MSP0\n");
+ }
+ else {
+ nmdk_dbg("Trying to free MSP from NON-SPI-mode , already configured in mode%d\n", flag_msp0->user);
+ status = -EFAULT;
+ }
+ break;
+ case 1: if(flag_msp1->user == user) {
+ down(&flag_msp1->lock);
+ flag_msp1->user = MSP_NO_USER;
+ up(&flag_msp1->lock);
+ nmdk_dbg("Flag cleanup for MSP1\n");
+ }
+ else {
+ nmdk_dbg("Trying to free MSP from NON-SPI-mode , already configured in mode%d\n", flag_msp1->user);
+ status = -EFAULT;
+ }
+ break;
+ case 2: if(flag_msp2->user == user) {
+ down(&flag_msp2->lock);
+ flag_msp2->user = MSP_NO_USER;
+ up(&flag_msp2->lock);
+ nmdk_dbg("Flag cleanup for MSP2\n");
+ }
+ else {
+ nmdk_dbg("Trying to free MSP from NON-SPI-mode , already configured in mode%d\n", flag_msp2->user);
+ status = -EFAULT;
+ }
+ break;
+ }
+ if(status)
+ return status;
+
+ if (!(registers[msp]->global_ctrl & (TX_ENABLE | RX_ENABLE))) {
+ goto disable_alt;
+ }
+
+ if (direction != MSP_RECEIVE_MODE) {
+ int status = nomadik_msp_wait_for_tx_complete(msp);
+ if (status) {
+ goto disable_alt;
+ }
+ }
+ switch (direction) {
+ case MSP_RECEIVE_MODE:
+ registers[msp]->global_ctrl &= ~RX_ENABLE;
+ registers[msp]->dma_ctrl &= ~RX_DMA_ENABLE;
+ registers[msp]->irq_mask &= ~(RECEIVE_SERVICE_INT |
+ RECEIVE_OVERRUN_ERROR_INT);
+ rx_status[msp].flow_error_count = 0;
+ break;
+ case MSP_TRANSMIT_MODE:
+ registers[msp]->global_ctrl &= ~TX_ENABLE;
+ registers[msp]->dma_ctrl &= ~TX_DMA_ENABLE;
+ registers[msp]->irq_mask &= ~(TRANSMIT_SERVICE_INT |
+ TRANSMIT_UNDERRUN_ERR_INT);
+ tx_status[msp].flow_error_count = 0;
+ break;
+ case MSP_BOTH_T_R_MODE:
+ registers[msp]->global_ctrl &= ~(TX_ENABLE | RX_ENABLE);
+ registers[msp]->dma_ctrl &= ~(TX_DMA_ENABLE | RX_DMA_ENABLE);
+ registers[msp]->irq_mask &= ~ALL_INT;
+ tx_status[msp].flow_error_count = 0;
+ rx_status[msp].flow_error_count = 0;
+ break;
+ default:
+ printk(KERN_ERR "Invalid direction param\n");
+ status = -EINVAL;
+ goto disable_alt;
+ }
+
+ msp_context[msp].msp_disable = 1;
+
+ if (!(registers[msp]->global_ctrl & (TX_ENABLE | RX_ENABLE))) {
+ /* disable sample rate and frame generators */
+ registers[msp]->global_ctrl &= ~(FRAME_GEN_ENABLE | SRG_ENABLE);
+
+ free_irq(msp_irq, (void *)registers[msp]);
+ }
+
+
+disable_alt:
+ switch (msp) {
+ case 0:
+ nomadik_gpio_altfuncdisable(altfunc[msp], "MSP_0");
+ break;
+ case 1:
+ nomadik_gpio_altfuncdisable(altfunc[msp], "MSP_1");
+ break;
+ case 2:
+ nomadik_gpio_altfuncdisable(altfunc[msp], "MSP_2");
+ break;
+ }
+
+ return status;
+}
+
+static int configure_protocol(int msp, int protocol, int direction,
+ enum msp_data_size data_size)
+{
+ u32 temp_reg;
+
+ if ((protocol < 0) || (protocol >= MSP_INVALID_PROTOCOL)) {
+ printk(KERN_ERR
+ "invalid protocol requested in configure_protocol()\n");
+ return -EINVAL;
+ }
+
+ if (data_size < MSP_DATA_SIZE_DEFAULT
+ || data_size > MSP_DATA_SIZE_32BIT) {
+ printk(KERN_ERR
+ "invalid data size requested in configure_protocol()\n");
+ return -EINVAL;
+ }
+
+ switch (direction) {
+ case MSP_TRANSMIT_MODE:
+ tx_status[msp].phase_mode =
+ protocol_desc_tab[protocol].phase_mode;
+
+ /* Use a temp for setup. Clear everything except the two non-mode
+ * dependent bits, then add back the bits for the selected protocol
+ */
+ temp_reg = (registers[msp]->tx_config) & MSP_NON_MODE_BIT_MASK;
+
+ temp_reg |=
+ msp_p2_enable_bit(protocol_desc_tab[protocol].phase_mode);
+ temp_reg |=
+ msp_p1_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_1);
+ temp_reg |=
+ msp_p2_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_2);
+ if (data_size == MSP_DATA_SIZE_DEFAULT) {
+ temp_reg |=
+ msp_p1_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_1);
+ temp_reg |=
+ msp_p2_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_2);
+ if (protocol_desc_tab[protocol].element_len_1 ==
+ protocol_desc_tab[protocol].element_len_2) {
+ msp_context[msp].actual_data_size =
+ protocol_desc_tab[protocol].element_len_1;
+ } else {
+ msp_context[msp].actual_data_size = data_size;
+ }
+ } else {
+ temp_reg |= msp_p1_elem_len_bits(data_size);
+ temp_reg |= msp_p2_elem_len_bits(data_size);
+ msp_context[msp].actual_data_size = data_size;
+ }
+ temp_reg |=
+ msp_data_delay_bits(protocol_desc_tab[protocol].data_delay);
+
+ (registers[msp]->tx_config) = temp_reg;
+
+ /* The tx_config register is done, now set the clock mode (rising
+ * or falling edge). We first clear the bit using the ~RISING value.
+ */
+ temp_reg = (registers[msp]->global_ctrl) & ~TX_CLK_POL_RISING;
+ temp_reg |=
+ msp_tx_clkpol_bit(protocol_desc_tab[protocol].
+ tx_clock_edge);
+ temp_reg |= TX_EXTRA_DELAY_ENABLE;
+ temp_reg |= msp_data_delay_bits(MSP_DELAY_1);
+
+ (registers[msp]->global_ctrl) = temp_reg;
+ break;
+ case MSP_RECEIVE_MODE:
+ rx_status[msp].phase_mode =
+ protocol_desc_tab[protocol].phase_mode;
+
+ /* Use a temp for setup. Clear everything except the two non-mode
+ * dependent bits, then add back the bits for the selected protocol
+ */
+ temp_reg = (registers[msp]->rx_config) & MSP_NON_MODE_BIT_MASK;
+
+ temp_reg |=
+ msp_p2_enable_bit(protocol_desc_tab[protocol].phase_mode);
+ temp_reg |=
+ msp_p1_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_1);
+ temp_reg |=
+ msp_p2_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_2);
+ if (data_size == MSP_DATA_SIZE_DEFAULT) {
+ temp_reg |=
+ msp_p1_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_1);
+ temp_reg |=
+ msp_p2_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_2);
+ if (protocol_desc_tab[protocol].element_len_1 ==
+ protocol_desc_tab[protocol].element_len_2) {
+ msp_context[msp].actual_data_size =
+ protocol_desc_tab[protocol].element_len_1;
+ } else {
+ msp_context[msp].actual_data_size = data_size;
+ }
+ } else {
+ temp_reg |= msp_p1_elem_len_bits(data_size);
+ temp_reg |= msp_p2_elem_len_bits(data_size);
+ msp_context[msp].actual_data_size = data_size;
+ }
+ temp_reg |=
+ msp_data_delay_bits(protocol_desc_tab[protocol].data_delay);
+
+ (registers[msp]->rx_config) = temp_reg;
+
+ /* The rx_config register is done, now set the clock mode (rising
+ * or falling edge). We first clear the bit using the ~RISING value.
+ */
+ temp_reg = (registers[msp]->global_ctrl) & ~RX_CLK_POL_RISING;
+ temp_reg |=
+ msp_rx_clkpol_bit(protocol_desc_tab[protocol].
+ rx_clock_edge);
+
+ (registers[msp]->global_ctrl) = temp_reg;
+ break;
+ case MSP_BOTH_T_R_MODE:
+ rx_status[msp].phase_mode =
+ protocol_desc_tab[protocol].phase_mode;
+ tx_status[msp].phase_mode =
+ protocol_desc_tab[protocol].phase_mode;
+
+ /* Use a temp for setup. Clear everything except the two non-mode
+ * dependent bits, then add back the bits for the selected protocol
+ * do rx_config first
+ */
+ temp_reg = (registers[msp]->rx_config) & MSP_NON_MODE_BIT_MASK;
+
+ temp_reg |=
+ msp_p2_enable_bit(protocol_desc_tab[protocol].phase_mode);
+ temp_reg |=
+ msp_p1_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_1);
+ temp_reg |=
+ msp_p2_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_2);
+ if (data_size == MSP_DATA_SIZE_DEFAULT) {
+ temp_reg |=
+ msp_p1_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_1);
+ temp_reg |=
+ msp_p2_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_2);
+ if (protocol_desc_tab[protocol].element_len_1 ==
+ protocol_desc_tab[protocol].element_len_2) {
+ msp_context[msp].actual_data_size =
+ protocol_desc_tab[protocol].element_len_1;
+ } else {
+ msp_context[msp].actual_data_size = data_size;
+ }
+ } else {
+ temp_reg |= msp_p1_elem_len_bits(data_size);
+ temp_reg |= msp_p2_elem_len_bits(data_size);
+ msp_context[msp].actual_data_size = data_size;
+ }
+ temp_reg |=
+ msp_data_delay_bits(protocol_desc_tab[protocol].data_delay);
+
+ (registers[msp]->rx_config) = temp_reg;
+
+ /* Now tx_config */
+ temp_reg = (registers[msp]->tx_config) & MSP_NON_MODE_BIT_MASK;
+
+ temp_reg |=
+ msp_p2_enable_bit(protocol_desc_tab[protocol].phase_mode);
+ temp_reg |=
+ msp_p1_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_1);
+ temp_reg |=
+ msp_p2_frame_len_bits(protocol_desc_tab[protocol].
+ frame_len_2);
+ if (data_size == MSP_DATA_SIZE_DEFAULT) {
+ temp_reg |=
+ msp_p1_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_1);
+ temp_reg |=
+ msp_p2_elem_len_bits(protocol_desc_tab[protocol].
+ element_len_2);
+ } else {
+ temp_reg |= msp_p1_elem_len_bits(data_size);
+ temp_reg |= msp_p2_elem_len_bits(data_size);
+ }
+ temp_reg |=
+ msp_data_delay_bits(protocol_desc_tab[protocol].data_delay);
+
+ (registers[msp]->tx_config) = temp_reg;
+ /* The [rt]x_config register is done, now set the clock mode (rising
+ * or falling edge). We first clear the bit using the ~RISING value.
+ */
+ temp_reg =
+ (registers[msp]->
+ global_ctrl) & ~(TX_CLK_POL_RISING | RX_CLK_POL_RISING);
+ temp_reg |=
+ msp_rx_clkpol_bit(protocol_desc_tab[protocol].
+ rx_clock_edge);
+ temp_reg |=
+ msp_tx_clkpol_bit(protocol_desc_tab[protocol].
+ tx_clock_edge);
+
+ (registers[msp]->global_ctrl) = temp_reg;
+ break;
+ default:
+ printk(KERN_ERR "Invalid direction given\n");
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int configure_clock(int msp, int protocol, u32 input_clock,
+ u32 frame_freq, int frame_size)
+{
+ u32 dummy;
+ u32 frame_per = 0;
+ u32 sck_div = 0;
+ u32 frame_width = 0;
+ u32 temp_reg = 0;
+ u32 data_size;
+
+ (registers[msp]->global_ctrl) &= ~SRG_ENABLE;
+
+ switch (msp_context[msp].actual_data_size) {
+ case MSP_DATA_SIZE_8BIT:
+ data_size = 8;
+ break;
+ case MSP_DATA_SIZE_10BIT:
+ data_size = 10;
+ break;
+ case MSP_DATA_SIZE_12BIT:
+ data_size = 12;
+ break;
+ case MSP_DATA_SIZE_14BIT:
+ data_size = 14;
+ break;
+ case MSP_DATA_SIZE_16BIT:
+ data_size = 16;
+ break;
+ case MSP_DATA_SIZE_20BIT:
+ data_size = 20;
+ break;
+ case MSP_DATA_SIZE_24BIT:
+ data_size = 24;
+ break;
+ case MSP_DATA_SIZE_32BIT:
+ data_size = 32;
+ break;
+ default:
+ printk(KERN_ERR
+ "Unable to determine data size in configure_clock\n");
+ return -EINVAL;
+ }
+
+ switch (protocol) {
+ case MSP_PCM_PROTOCOL:
+ case MSP_PCM_COMPAND_PROTOCOL:
+ case MSP_MASTER_SPI_PROTOCOL:
+ if (frame_size < 0) {
+ frame_per = data_size;
+ if (protocol == MSP_MASTER_SPI_PROTOCOL) {
+ /* Need 1 clock between start of frame and start
+ * of data, and 1 clock to indicate end of frame
+ */
+ frame_per += 2;
+ }
+ } else {
+ frame_per = data_size;
+ }
+ if (frame_per < data_size) {
+ printk(KERN_ERR
+ "Frame size too small in configure_clock\n");
+ return -EINVAL;
+ }
+ frame_width = 1;
+
+ sck_div = input_clock / (frame_freq << 8);
+ frame_per = MSP_FRAME_PERIOD_IN_MONO_MODE;
+
+ break;
+ case MSP_I2S_PROTOCOL:
+ sck_div = input_clock / (frame_freq << 5);
+ frame_per = MSP_FRAME_PERIOD_IN_STEREO_MODE;
+ frame_width = MSP_FRAME_WIDTH_IN_STEREO_MODE;
+
+ break;
+ case MSP_AC97_PROTOCOL:
+ /* Not supported */
+ printk(KERN_WARNING "AC97 protocol not supported\n");
+ return -ENOSYS;
+ case MSP_SLAVE_SPI_PROTOCOL:
+ sck_div = 1;
+ break;
+ default:
+ printk(KERN_ERR "Invalid mode attempted for setting clocks\n");
+ return -EINVAL;
+ }
+
+ temp_reg = (sck_div - 1) & SCK_DIV_MASK;
+ temp_reg |= frame_width_bits(frame_width - 1);
+ temp_reg |= frame_period_bits(frame_per - 1);
+ registers[msp]->srg_ctrl = temp_reg;
+
+ /* Wait a bit */
+ dummy = ((registers[msp]->srg_ctrl) >> FRWID_BIT) & 0x0000003F;
+
+ /* Enable clock */
+ registers[msp]->global_ctrl |= SRG_ENABLE;
+
+ /* Another wait */
+ dummy = ((registers[msp]->srg_ctrl) >> FRWID_BIT) & 0x0000003F;
+ /* reconfigure spi clock mode */
+ temp_reg = registers[msp]->global_ctrl;
+ temp_reg &= ~SPI_CLK_MODE_MASK;
+ temp_reg |= spi_clock_mode[msp];
+ temp_reg &= ~SPI_BURST_MODE_MASK;
+ temp_reg |= spi_burst_mode[msp];
+
+ registers[msp]->global_ctrl = temp_reg;
+ return 0;
+}
+
+static irqreturn_t handle_irq(int irq, void *dev_id)
+{
+ int msp;
+ u32 irq_status;
+
+ /* dev_id should be the register base address, find out which MSP
+ * we are dealing with. */
+ for (msp = 0; msp < MSP_COUNT; msp++) {
+ if (dev_id == registers[msp]) {
+ break;
+ }
+ }
+
+ if (msp == MSP_COUNT) {
+ /* Didn't find the MSP, this must not be our interrupt */
+ return -1;
+ }
+
+ irq_status = registers[msp]->masked_irq_status;
+
+ /* Disable the interrupt to prevent immediate recurrence */
+ registers[msp]->irq_mask &= ~irq_status;
+
+ /* Clear the interrupt */
+ registers[msp]->irq_clear = irq_status;
+
+ /* Check for an error condition */
+ msp_io_error[msp] |= irq_status & (RECEIVE_OVERRUN_ERROR_INT |
+ RECEIVE_FRAME_SYNC_ERR_INT |
+ TRANSMIT_UNDERRUN_ERR_INT |
+ TRANSMIT_FRAME_SYNC_ERR_INT);
+
+ /* Wake up the reader/writer */
+ wake_up_interruptible(&wait[msp]);
+ return IRQ_HANDLED;
+
+}
+
+static int transmit_data(int msp, void *data, size_t bytes)
+{
+ return transmit_receive_data(msp, tx_status[msp].work_mode,
+ data, bytes, NULL, 0);
+}
+
+static int receive_data(int msp, void *data, size_t bytes)
+{
+ return transmit_receive_data(msp, rx_status[msp].work_mode,
+ NULL, 0, data, bytes);
+}
+
+static int transmit_receive_data(int msp, int work_mode,
+ void *txdata, size_t txbytes,
+ void *rxdata, size_t rxbytes)
+{
+ int status;
+ u32 tx_offset = 0;
+ u32 rx_offset = 0;
+ u8 *data_src_8bit, *data_dst_8bit;
+ u16 *data_src_16bit, *data_dst_16bit;
+ u32 *data_src_32bit, *data_dst_32bit;
+
+ if (txdata == NULL && txbytes > 0) {
+ printk(KERN_ERR
+ "transmit_receive_data received a NULL transmit buffer with bytes to transmit\n");
+ return -EINVAL;
+ }
+
+ if (rxdata == NULL && rxbytes > 0) {
+ printk(KERN_ERR
+ "transmit_receive_data received a NULL receive buffer with bytes to receive\n");
+ return -EINVAL;
+ }
+
+ data_src_8bit = (u8 *) txdata;
+ data_src_16bit = (u16 *) txdata;
+ data_src_32bit = (u32 *) txdata;
+
+ data_dst_8bit = (u8 *) rxdata;
+ data_dst_16bit = (u16 *) rxdata;
+ data_dst_32bit = (u32 *) rxdata;
+
+ msp_io_error[msp] = 0;
+
+ while (tx_offset < txbytes || rx_offset < rxbytes) {
+ if (msp_io_error[msp]) {
+ return -EIO;
+ }
+
+ if (rx_offset < rxbytes &&
+ !((registers[msp]->status) & RX_FIFO_EMPTY)) {
+ switch (msp_context[msp].actual_data_size) {
+ case MSP_DATA_SIZE_8BIT:
+ rx_offset += sizeof(*data_dst_8bit);
+ *data_dst_8bit++ = registers[msp]->fifo;
+ break;
+ case MSP_DATA_SIZE_10BIT:
+ case MSP_DATA_SIZE_12BIT:
+ case MSP_DATA_SIZE_14BIT:
+ case MSP_DATA_SIZE_16BIT:
+ rx_offset += sizeof(*data_dst_16bit);
+ *data_dst_16bit++ = registers[msp]->fifo;
+ break;
+ case MSP_DATA_SIZE_20BIT:
+ case MSP_DATA_SIZE_24BIT:
+ case MSP_DATA_SIZE_32BIT:
+ rx_offset += sizeof(*data_dst_32bit);
+ *data_dst_32bit++ = registers[msp]->fifo;
+ break;
+ default:
+ printk(KERN_ERR
+ "Unable to determine data size in transmit_receive_data\n");
+ return -EIO;
+ }
+ }
+
+ if (tx_offset < txbytes &&
+ !((registers[msp]->status) & TX_FIFO_FULL)) {
+ switch (msp_context[msp].actual_data_size) {
+ case MSP_DATA_SIZE_8BIT:
+ tx_offset += sizeof(*data_src_8bit);
+ registers[msp]->fifo = *data_src_8bit++;
+ break;
+ case MSP_DATA_SIZE_10BIT:
+ case MSP_DATA_SIZE_12BIT:
+ case MSP_DATA_SIZE_14BIT:
+ case MSP_DATA_SIZE_16BIT:
+ tx_offset += sizeof(*data_src_16bit);
+ registers[msp]->fifo = *data_src_16bit++;
+ break;
+ case MSP_DATA_SIZE_20BIT:
+ case MSP_DATA_SIZE_24BIT:
+ case MSP_DATA_SIZE_32BIT:
+ tx_offset += sizeof(*data_src_32bit);
+ registers[msp]->fifo = *data_src_32bit++;
+ break;
+ default:
+ printk(KERN_ERR
+ "Unable to determine data size in transmit_receive_data\n");
+ return -EIO;
+ }
+ }
+
+ if (work_mode == MSP_INTERRUPT_MODE &&
+ (tx_offset < txbytes || rx_offset < rxbytes)) {
+ u32 status_mask = 0;
+ u32 irq_mask = 0;
+ if (tx_offset < txbytes) {
+ status_mask |= TX_FIFO_FULL;
+ irq_mask |= TRANSMIT_SERVICE_INT;
+ if (!(registers[msp]->status & TX_FIFO_FULL)) {
+ continue;
+ }
+ }
+ if (rx_offset < rxbytes) {
+ status_mask |= RX_FIFO_EMPTY;
+ irq_mask |= RECEIVE_SERVICE_INT;
+ if (!(registers[msp]->status & RX_FIFO_EMPTY)) {
+ continue;
+ }
+ }
+ registers[msp]->irq_mask |= irq_mask;
+ status = wait_event_interruptible(wait[msp],
+ !(registers[msp]->
+ status &
+ status_mask)
+ && msp_io_error[msp]
+ == 0);
+ if (status) {
+ return status;
+ }
+ }
+ }
+
+ return txbytes + rxbytes;
+}
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+
+/**
+ * msp_controller_cmd - To execute controller specific commands for MSP
+ * @drv_data: SPI driver private data structure
+ * @cmd: Command which is to be executed on the controller
+ *
+ *
+ */
+static int msp_controller_cmd(struct driver_data *drv_data, int cmd)
+{
+ int retval = 0;
+ nmdk_dbg_ftrace();
+ switch (cmd)
+ {
+ case DISABLE_CONTROLLER:
+ {
+ nmdk_dbg2(":::: DISABLE_CONTROLLER\n");
+ writel((readl(MSP_GCR(drv_data->regs)) & (~(MSP_GCR_MASK_TXEN | MSP_GCR_MASK_RXEN ))), MSP_GCR(drv_data->regs));
+ break;
+ }
+ case ENABLE_CONTROLLER:
+ {
+ nmdk_dbg2(":::: ENABLE_CONTROLLER\n");
+ writel((readl(MSP_GCR(drv_data->regs)) | (MSP_GCR_MASK_TXEN | MSP_GCR_MASK_RXEN )), MSP_GCR(drv_data->regs));
+ break;
+ }
+ case DISABLE_DMA:
+ {
+ nmdk_dbg2(":::: DISABLE_DMA\n");
+ writel(DEFAULT_MSP_REG_DMACR, MSP_DMACR(drv_data->regs));
+ break;
+ }
+ case ENABLE_DMA:
+ {
+ nmdk_dbg2(":::: ENABLE_DMA\n");
+ writel(drv_data->cur_chip->regs.mspr.dmacr, MSP_DMACR(drv_data->regs));
+ break;
+ }
+ case DISABLE_ALL_INTERRUPT:
+ {
+ nmdk_dbg2(":::: DISABLE_ALL_INTERRUPT\n");
+ writel(DISABLE_ALL_MSP_INTERRUPTS, MSP_IMSC(drv_data->regs));
+ break;
+ }
+ case ENABLE_ALL_INTERRUPT:
+ {
+ nmdk_dbg2(":::: ENABLE_ALL_INTERRUPT\n");
+ writel( ENABLE_ALL_MSP_INTERRUPTS, MSP_IMSC(drv_data->regs));
+ break;
+ }
+ case CLEAR_ALL_INTERRUPT:
+ {
+ nmdk_dbg2(":::: CLEAR_ALL_INTERRUPT\n");
+ writel(CLEAR_ALL_MSP_INTERRUPTS, MSP_ICR(drv_data->regs));
+ break;
+ }
+ case FLUSH_FIFO:
+ {
+ unsigned long limit = loops_per_jiffy << 1;
+ nmdk_dbg2(":::: DATA FIFO is flushed\n");
+ do {
+ while( ! (readl(MSP_FLR(drv_data->regs)) & MSP_FLR_MASK_RFE))
+ readl(MSP_DR(drv_data->regs));
+ } while ((readl(MSP_FLR(drv_data->regs)) & (MSP_FLR_MASK_TBUSY | MSP_FLR_MASK_RBUSY)) && limit--);
+ retval = limit;
+ break;
+ }
+ case RESTORE_STATE:
+ {
+ struct chip_data *chip = drv_data->cur_chip;
+ nmdk_dbg2(":::: RESTORE_STATE\n");
+ writel(chip->regs.mspr.gcr, MSP_GCR(drv_data->regs));
+ writel(chip->regs.mspr.tcf, MSP_TCF(drv_data->regs));
+ writel(chip->regs.mspr.rcf, MSP_RCF(drv_data->regs));
+ writel(chip->regs.mspr.srg, MSP_SRG(drv_data->regs));
+ writel(chip->regs.mspr.dmacr, MSP_DMACR(drv_data->regs));
+ writel(DISABLE_ALL_MSP_INTERRUPTS, MSP_IMSC(drv_data->regs));
+ writel(CLEAR_ALL_MSP_INTERRUPTS, MSP_ICR(drv_data->regs));
+ break;
+ }
+ case LOAD_DEFAULT_CONFIG:
+ {
+ nmdk_dbg2(":::: LOAD_DEFAULT_CONFIG\n");
+ writel(DEFAULT_MSP_REG_GCR, MSP_GCR(drv_data->regs));
+ writel(DEFAULT_MSP_REG_TCF, MSP_TCF(drv_data->regs));
+ writel(DEFAULT_MSP_REG_RCF, MSP_RCF(drv_data->regs));
+ writel(DEFAULT_MSP_REG_SRG, MSP_SRG(drv_data->regs));
+ writel(DEFAULT_MSP_REG_DMACR, MSP_DMACR(drv_data->regs));
+ writel(DISABLE_ALL_MSP_INTERRUPTS, MSP_IMSC(drv_data->regs));
+ writel(CLEAR_ALL_MSP_INTERRUPTS, MSP_ICR(drv_data->regs));
+ break;
+ }
+ default:
+ {
+ nmdk_dbg2(":::: unknown command\n");
+ retval = -1;
+ break;
+ }
+ }
+ return retval;
+}
+
+void msp_u8_writer(struct driver_data *drv_data)
+{
+ u32 cur_write = 0;
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+ if((status & MSP_FLR_MASK_TFU) || (drv_data->tx >= drv_data->tx_end))
+ return;
+ writel((u32) (*(u8 *) (drv_data->tx)), MSP_DR(drv_data->regs));
+ drv_data->tx += (drv_data->cur_chip->n_bytes);
+ cur_write ++;
+ if(cur_write == 8)
+ return;
+ }
+}
+void msp_u8_reader(struct driver_data *drv_data)
+{
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+ if( (status & MSP_FLR_MASK_RFE) || ( drv_data->rx >= drv_data->rx_end))
+ return;
+ *(u8 *) (drv_data->rx) = (u8) readl(MSP_DR(drv_data->regs));
+ drv_data->rx += (drv_data->cur_chip->n_bytes);
+ }
+}
+void msp_u16_writer(struct driver_data *drv_data)
+{
+ u32 cur_write = 0;
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+
+ if((status & MSP_FLR_MASK_TFU) || (drv_data->tx >= drv_data->tx_end))
+ return;
+ writel((u32) (*(u16 *) (drv_data->tx)), MSP_DR(drv_data->regs));
+ drv_data->tx += (drv_data->cur_chip->n_bytes);
+ cur_write ++;
+ if(cur_write == 8)
+ return;
+ }
+}
+void msp_u16_reader(struct driver_data *drv_data)
+{
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+ if( (status & MSP_FLR_MASK_RFE) || ( drv_data->rx >= drv_data->rx_end))
+ return;
+ *(u16 *) (drv_data->rx) = (u16) readl(MSP_DR(drv_data->regs));
+ drv_data->rx += (drv_data->cur_chip->n_bytes);
+ }
+}
+
+void msp_u32_writer(struct driver_data *drv_data)
+{
+ u32 cur_write = 0;
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+
+ if((status & MSP_FLR_MASK_TFU) || (drv_data->tx >= drv_data->tx_end))
+ return;
+ /*Write Data to Data Register */
+ writel(*(u32 *) (drv_data->tx), MSP_DR(drv_data->regs));
+ drv_data->tx += (drv_data->cur_chip->n_bytes);
+ cur_write ++;
+ if(cur_write == 8)
+ return;
+ }
+}
+void msp_u32_reader(struct driver_data *drv_data)
+{
+ u32 status;
+ while(1){
+ status = readl(MSP_FLR(drv_data->regs));
+ if( (status & MSP_FLR_MASK_RFE) || ( drv_data->rx >= drv_data->rx_end))
+ return;
+ *(u32 *) (drv_data->rx) = readl(MSP_DR(drv_data->regs));
+ drv_data->rx += (drv_data->cur_chip->n_bytes);
+ }
+}
+
+static irqreturn_t nomadik_msp_interrupt_handler(int irq, void *dev_id)
+{
+ struct driver_data *drv_data = (struct driver_data *)dev_id;
+ struct spi_message *msg = drv_data->cur_msg;
+ u32 irq_status = 0;
+ u32 flag = 0;
+ if (!msg) {
+ dev_err(&drv_data->adev->dev,
+ "bad message state in interrupt handler");
+ /* Never fail */
+ return IRQ_HANDLED;
+ }
+ /*Read the Interrupt Status Register */
+ irq_status = readl(MSP_MIS(drv_data->regs));
+
+ if (irq_status) {
+ if (irq_status & MSP_MIS_MASK_ROEMIS) { /*Overrun interrupt */
+ /*Bail-out our Data has been corrupted */
+ nmdk_dbg3(":::: Received ROR interrupt\n");
+ drv_data->execute_cmd(drv_data, DISABLE_ALL_INTERRUPT);
+ drv_data->execute_cmd(drv_data, CLEAR_ALL_INTERRUPT);
+ drv_data->execute_cmd(drv_data, DISABLE_CONTROLLER);
+ msg->state = ERROR_STATE;
+ tasklet_schedule(&drv_data->pump_transfers);
+ return IRQ_HANDLED;
+ }
+
+ drv_data->read(drv_data);
+ drv_data->write(drv_data);
+
+ if ((drv_data->tx == drv_data->tx_end) && (flag == 0)) {
+ flag = 1;
+ /*Disable Transmit interrupt */
+ writel(readl(MSP_IMSC(drv_data->regs)) & (~MSP_IMSC_MASK_TXIM) & (~MSP_IMSC_MASK_TFOIM), (drv_data->regs + 0x14));
+ }
+ /*Clearing any Transmit underrun error. overrun already handled*/
+ drv_data->execute_cmd(drv_data, CLEAR_ALL_INTERRUPT);
+
+ if (drv_data->rx == drv_data->rx_end) {
+ drv_data->execute_cmd(drv_data, DISABLE_ALL_INTERRUPT);
+ drv_data->execute_cmd(drv_data, CLEAR_ALL_INTERRUPT);
+ nmdk_dbg3(":::: Interrupt transfer Completed...\n");
+ /* Update total bytes transfered */
+ msg->actual_length += drv_data->cur_transfer->len;
+ if (drv_data->cur_transfer->cs_change)
+ drv_data->cur_chip->
+ cs_control(SPI_CHIP_DESELECT);
+ /* Move to next transfer */
+ msg->state = next_transfer(drv_data);
+ tasklet_schedule(&drv_data->pump_transfers);
+ return IRQ_HANDLED;
+ }
+ }
+ return IRQ_HANDLED;
+}
+
+static int verify_msp_controller_parameters(struct nmdk_spi_config_chip *chip_info)
+{
+ nmdk_dbg_ftrace();
+ /*FIXME: check clock params*/
+ if ((chip_info->lbm != LOOPBACK_ENABLED)
+ && (chip_info->lbm != LOOPBACK_DISABLED)) {
+ nmdk_dbg(":::: Loopback Mode is configured incorrectly\n");
+ return -1;
+ }
+ if (chip_info->iface != SPI_INTERFACE_MOTOROLA_SPI){
+ nmdk_dbg(":::: Interface is configured incorrectly. This controller supports only MOTOROLA SPI\n");
+ return -1;
+ }
+ if ((chip_info->hierarchy != SPI_MASTER)
+ && (chip_info->hierarchy != SPI_SLAVE)) {
+ nmdk_dbg(":::: hierarchy is configured incorrectly\n");
+ return -1;
+ }
+ if ((chip_info->endian_rx != SPI_FIFO_MSB)
+ && (chip_info->endian_rx != SPI_FIFO_LSB)) {
+ nmdk_dbg(":::: Rx FIFO endianess is configured incorrectly\n");
+ return -1;
+ }
+ if ((chip_info->endian_tx != SPI_FIFO_MSB)
+ && (chip_info->endian_tx != SPI_FIFO_LSB)) {
+ nmdk_dbg(":::: Tx FIFO endianess is configured incorrectly\n");
+ return -1;
+ }
+ if (((chip_info->controller).msp.data_size < MSP_DATA_BITS_8) || ((chip_info->controller).msp.data_size > MSP_DATA_BITS_32)) {
+ nmdk_dbg(":::: MSP DATA Size is configured incorrectly\n");
+ return -1;
+ }
+ if ((chip_info->com_mode != INTERRUPT_TRANSFER)
+ && (chip_info->com_mode != DMA_TRANSFER)
+ && (chip_info->com_mode != POLLING_TRANSFER)) {
+ nmdk_dbg(":::: Communication mode is configured incorrectly\n");
+ return -1;
+ }
+ if (chip_info->iface == SPI_INTERFACE_MOTOROLA_SPI) {
+ if (((chip_info->proto_params).moto.clk_phase != SPI_CLK_ZERO_CYCLE_DELAY)
+ && ((chip_info->proto_params).moto.clk_phase != SPI_CLK_HALF_CYCLE_DELAY)) {
+ nmdk_dbg(":::: Clock Phase is configured incorrectly\n");
+ return -1;
+ }
+ if (((chip_info->proto_params).moto.clk_pol != SPI_CLK_POL_IDLE_LOW)
+ && ((chip_info->proto_params).moto.clk_pol != SPI_CLK_POL_IDLE_HIGH)) {
+ nmdk_dbg(":::: Clock Polarity is configured incorrectly\n");
+ return -1;
+ }
+ }
+ if (chip_info->cs_control == NULL) {
+ nmdk_dbg("::::Chip Select Function is NULL for this chip\n");
+ chip_info->cs_control = null_cs_control;
+ }
+ return 0;
+}
+
+/**
+ * nomadik_msp_setup - setup function registered to SPI master framework
+ * @spi: spi device which is requesting setup
+ *
+ * This function is registered to the SPI framework for this SPI master
+ * controller. If it is the first time when setup is called by this device
+ * , this function will initialize the runtime state for this chip and save
+ * the same in the device structure. Else it will update the runtime info
+ * with the updated chip info.
+ */
+
+static int nomadik_msp_setup(struct spi_device *spi)
+{
+ struct nmdk_spi_config_chip *chip_info;
+ struct chip_data *chip;
+ struct spi_master *master;
+ int status = 0;
+ u16 sckdiv = 0;
+ struct driver_data *drv_data = spi_master_get_devdata(spi->master);
+ nmdk_dbg_ftrace();
+ master = drv_data->master;
+
+ switch(master->bus_num) {
+ case MSP_0_CONTROLLER:
+ if((drv_data->flag_msp0->user != MSP_NO_USER) && (drv_data->flag_msp0->user != MSP_USER_SPI)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP0 already in use in %d mode", drv_data->flag_msp0->user);
+ }
+ else {
+ down(&drv_data->flag_msp0->lock);
+ drv_data->flag_msp0->user = MSP_USER_SPI;
+ up(&drv_data->flag_msp0->lock);
+ nmdk_dbg("Flag set to MSP_USER_SPI for MSP0\n");
+ }
+ break;
+ case MSP_1_CONTROLLER:
+ if((drv_data->flag_msp1->user != MSP_NO_USER) && (drv_data->flag_msp1->user != MSP_USER_SPI)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP1 already in use in %d mode", drv_data->flag_msp1->user);
+ }
+ else {
+ down(&drv_data->flag_msp1->lock);
+ drv_data->flag_msp1->user = MSP_USER_SPI;
+ up(&drv_data->flag_msp1->lock);
+ nmdk_dbg("Flag set to MSP_USER_SPI for MSP1\n");
+ }
+ break;
+ case MSP_2_CONTROLLER:
+ if((drv_data->flag_msp2->user != MSP_NO_USER) && (drv_data->flag_msp2->user != MSP_USER_SPI)){
+ status = -EINVAL;
+ printk(KERN_ERR "MSP2 already in use in %d mode", drv_data->flag_msp2->user);
+ }
+ else {
+ down(&drv_data->flag_msp2->lock);
+ drv_data->flag_msp2->user = MSP_USER_SPI;
+ up(&drv_data->flag_msp2->lock);
+ nmdk_dbg("Flag set to MSP_USER_SPI for MSP2\n");
+ }
+ break;
+ }
+ if(status)
+ return status;
+
+ status = nomadik_gpio_altfuncenable(drv_data->master_info->gpio_alt_func, drv_data->master_info->device_name);
+ if (status < 0) {
+ dev_err(&drv_data->adev->dev, "probe - unable to set GPIO Altfunc, %d\n", drv_data->master_info->gpio_alt_func);
+ status = -ENODEV;
+ goto err_out;
+ }
+
+ status = request_irq(drv_data->adev->irq[0], nomadik_msp_interrupt_handler, 0, drv_data->master_info->device_name , drv_data);
+ if (status < 0) {
+ dev_err(&drv_data->adev->dev, "probe - cannot get IRQ (%d)\n", status);
+ goto err_altfunc_enable;
+ }
+
+ /* Get controller data */
+ chip_info = spi->controller_data;
+ /* Get controller_state */
+ chip = spi_get_ctldata(spi);
+ if (chip == NULL) {
+ chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
+ if (!chip) {
+ dev_err(&spi->dev,
+ "setup - cannot allocate controller state");
+ goto err_request_irq;
+ }
+ chip->chip_id = spi->chip_select;
+
+ nmdk_dbg(":::: chip Id for this client = %d\n", chip->chip_id);
+ nmdk_dbg(":::: Allocated Memory for controller's runtime state\n");
+
+ if (chip_info == NULL) {
+ /* spi_board_info.controller_data not is supplied */
+ chip_info =
+ kzalloc(sizeof(struct nmdk_spi_config_chip), GFP_KERNEL);
+ if (!chip_info) {
+ dev_err(&spi->dev,
+ "setup - cannot allocate controller data");
+ status = -ENOMEM;
+ goto err_first_setup;
+ }
+ nmdk_dbg(":::: Allocated Memory for controller data\n");
+
+ /* FIXME: Set controller data default value for MSP*/
+ chip_info->lbm = LOOPBACK_DISABLED;
+ chip_info->com_mode = POLLING_TRANSFER;
+ chip_info->iface = SPI_INTERFACE_MOTOROLA_SPI;
+ chip_info->hierarchy = SPI_MASTER;
+ chip_info->endian_tx = SPI_FIFO_LSB;
+ chip_info->endian_rx = SPI_FIFO_LSB;
+ (chip_info->controller).msp.data_size = MSP_DATA_BITS_32;
+
+ if(spi->max_speed_hz != 0)
+ chip_info->freq = spi->max_speed_hz;
+ else
+ chip_info->freq = 48000;
+
+ (chip_info->proto_params).moto.clk_phase = SPI_CLK_HALF_CYCLE_DELAY;
+ (chip_info->proto_params).moto.clk_pol = SPI_CLK_POL_IDLE_LOW;
+ chip_info->cs_control = null_cs_control;
+ }
+ }
+
+ if(chip_info->freq == 0){
+ /*Calculate Specific Freq.*/
+ if ( (MSP_INTERNAL_CLK == (chip_info->controller).msp.clk_freq.clk_src)
+ || ( MSP_EXTERNAL_CLK == (chip_info->controller).msp.clk_freq.clk_src)){
+ sckdiv = (chip_info->controller).msp.clk_freq.sckdiv;
+
+ }else{
+ status = -1;
+ dev_err(&spi->dev, "setup - controller clock data is incorrect");
+ goto err_config_params;
+ }
+ }else{
+ /*Calculate Effective Freq.*/
+ sckdiv =((DEFAULT_MSP_CLK) / (chip_info->freq)) - 1;
+ if(sckdiv > MAX_SCKDIV){
+ printk("SPI: Cannot set frequency less than 48Khz, setting lowest(48 Khz)\n");
+ sckdiv = MAX_SCKDIV;
+ }
+ }
+
+
+ status = verify_msp_controller_parameters(chip_info);
+ if (status) {
+ dev_err(&spi->dev, "setup - controller data is incorrect");
+ goto err_config_params;
+ }
+
+ /* Now set controller state based on controller data */
+ chip->xfer_type = chip_info->com_mode;
+ chip->cs_control = chip_info->cs_control;
+
+
+ /*FIXME: write all 8 & 16 bit functions*/
+ if ((chip_info->controller).msp.data_size <= MSP_DATA_BITS_8) {
+ nmdk_dbg(":::: Less than 8 bits per word....\n");
+ chip->n_bytes = 1;
+ chip->read = msp_u8_reader;
+ chip->write = msp_u8_writer;
+ } else if ((chip_info->controller).msp.data_size <= MSP_DATA_BITS_16) {
+ nmdk_dbg(":::: Less than 16 bits per word....\n");
+ chip->n_bytes = 2;
+ chip->read = msp_u16_reader;
+ chip->write = msp_u16_writer;
+ } else {
+ nmdk_dbg(":::: Less than 32 bits per word....\n");
+ chip->n_bytes = 4;
+ chip->read = msp_u32_reader;
+ chip->write = msp_u32_writer;
+ }
+
+ /*Now Initialize all register settings reqd. for this chip */
+
+ chip->regs.mspr.gcr = 0x0;
+ chip->regs.mspr.tcf = 0x0;
+ chip->regs.mspr.rcf = 0x0;
+ chip->regs.mspr.srg = 0x0;
+ chip->regs.mspr.dmacr = 0x0;
+
+ if ((chip_info->com_mode == DMA_TRANSFER)
+ && ((drv_data->master_info)->enable_dma)) {
+ chip->enable_dma = 1;
+ chip->dma_info = kzalloc(sizeof(struct spi_dma_info), GFP_KERNEL);
+ if(!chip->dma_info){
+ nmdk_dbg("Could not allocate memory for dma info of chip_data\n");
+ goto err_first_setup;
+ }
+ chip->dma_info->dma_xfer_type = chip_info->dma_xfer_type;
+ nmdk_dbg(":::: DMA mode set in controller state\n");
+ status = process_dma_info(chip_info, chip, (void *)drv_data);
+ if (status < 0)
+ goto err_config_params;
+ SPI_REG_WRITE_BITS(chip->regs.mspr.dmacr, 0x1, MSP_DMACR_MASK_RDMAE, 0);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.dmacr, 0x1, MSP_DMACR_MASK_TDMAE, 1);
+
+ /* find and request free dma chanel */
+ chip->dma_info->rx_dmach = request_available_dma(&(chip->dma_info->rx_dma_info));
+ if (chip->dma_info->rx_dmach < 0) {
+ nmdk_dbg(":::: Rx pipe request Failed: %d\n", chip->dma_info->rx_dmach);
+ goto err_rx_dmach_request;
+ }
+ nmdk_dbg(":::: Rx pipe Allocated = %d\n", chip->dma_info->rx_dmach);
+
+ status = request_irq(IRQNO_FOR_DMACH(chip->dma_info->rx_dmach),
+ spi_dma_callback_handler, 0, 0,
+ (void *)drv_data);
+ if (status) {
+ nmdk_error("Error requesting rx callback dmach intr handler %d", status);
+ goto err_rx_clbk_request;
+ }
+
+ /* find and request free dma chanel */
+ chip->dma_info->tx_dmach = request_available_dma(&(chip->dma_info->tx_dma_info));
+ if (chip->dma_info->tx_dmach < 0) {
+ nmdk_dbg(":::: Tx pipe request Failed: %d\n", status);
+ goto err_tx_dmach_request;
+ }
+ nmdk_dbg(":::: Tx pipe Allocated = %d\n", chip->dma_info->tx_dmach);
+
+ status = request_irq(IRQNO_FOR_DMACH(chip->dma_info->tx_dmach),
+ spi_dma_callback_handler, 0, 0,
+ (void *)drv_data);
+ if (status) {
+ nmdk_error("Error requesting callback dmach intr handler %d", status);
+ goto err_tx_clbk_request;
+ }
+ } else {
+ chip->enable_dma = 0;
+ nmdk_dbg(":::: DMA mode NOT set in controller state\n");
+ SPI_REG_WRITE_BITS(chip->regs.mspr.dmacr, 0x0, MSP_DMACR_MASK_RDMAE, 0);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.dmacr, 0x0, MSP_DMACR_MASK_TDMAE, 1);
+ }
+
+
+ /**** GCR Reg Config *****/
+
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_RECEIVER_DISABLED, MSP_GCR_MASK_RXEN,0);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_RX_FIFO_ENABLED, MSP_GCR_MASK_RFFEN,1);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TRANSMITTER_DISABLED, MSP_GCR_MASK_TXEN,8);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TX_FIFO_ENABLED, MSP_GCR_MASK_TFFEN,9);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TX_FRAME_SYNC_POL_LOW, MSP_GCR_MASK_TFSPOL,10);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TX_FRAME_SYNC_INT, MSP_GCR_MASK_TFSSEL,11);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TRANSMIT_DATA_WITH_DELAY, MSP_GCR_MASK_TXDDL,15);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_SAMPLE_RATE_GEN_ENABLE, MSP_GCR_MASK_SGEN,16);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_CLOCK_INTERNAL, MSP_GCR_MASK_SCKSEL,18);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_FRAME_GEN_ENABLE, MSP_GCR_MASK_FGEN,20);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, SPI_BURST_MODE_DISABLE, MSP_GCR_MASK_SPIBME,23);
+
+
+ if(chip_info->lbm == LOOPBACK_ENABLED)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_LOOPBACK_ENABLED, MSP_GCR_MASK_LBM, 7);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_LOOPBACK_DISABLED, MSP_GCR_MASK_LBM, 7);
+
+
+ if(chip_info->hierarchy == SPI_MASTER)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_IS_SPI_MASTER, MSP_GCR_MASK_TCKSEL, 14);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_IS_SPI_SLAVE, MSP_GCR_MASK_TCKSEL, 14);
+
+
+ if(chip_info->proto_params.moto.clk_phase == SPI_CLK_ZERO_CYCLE_DELAY)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_SPI_PHASE_ZERO_CYCLE_DELAY , MSP_GCR_MASK_SPICKM, 21);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_SPI_PHASE_HALF_CYCLE_DELAY , MSP_GCR_MASK_SPICKM, 21);
+
+ if(chip_info->proto_params.moto.clk_pol == SPI_CLK_POL_IDLE_HIGH)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TX_CLOCK_POL_HIGH, MSP_GCR_MASK_TCKPOL,13);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.gcr, MSP_TX_CLOCK_POL_LOW, MSP_GCR_MASK_TCKPOL,13);
+
+
+ /**** RCF Reg Config *****/
+ SPI_REG_WRITE_BITS(chip->regs.mspr.rcf, MSP_IGNORE_RX_FRAME_SYNC_PULSE, MSP_RCF_MASK_RFSIG, 15);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.rcf, MSP_RX_1BIT_DATA_DELAY, MSP_RCF_MASK_RDDLY, 13);
+ if(chip_info->endian_rx == SPI_FIFO_LSB)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.rcf, MSP_RX_ENDIANESS_LSB , MSP_RCF_MASK_RENDN, 12);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.rcf, MSP_RX_ENDIANESS_MSB , MSP_RCF_MASK_RENDN, 12);
+
+ SPI_REG_WRITE_BITS(chip->regs.mspr.rcf, chip_info->controller.msp.data_size , MSP_RCF_MASK_RP1ELEN, 0);
+
+ /**** TCF Reg Config *****/
+ SPI_REG_WRITE_BITS(chip->regs.mspr.tcf, MSP_IGNORE_TX_FRAME_SYNC_PULSE, MSP_TCF_MASK_TFSIG, 15);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.tcf, MSP_TX_1BIT_DATA_DELAY, MSP_TCF_MASK_TDDLY, 13);
+ if(chip_info->endian_rx == SPI_FIFO_LSB)
+ SPI_REG_WRITE_BITS(chip->regs.mspr.tcf, MSP_TX_ENDIANESS_LSB , MSP_TCF_MASK_TENDN, 12);
+ else
+ SPI_REG_WRITE_BITS(chip->regs.mspr.tcf, MSP_TX_ENDIANESS_MSB , MSP_TCF_MASK_TENDN, 12);
+ SPI_REG_WRITE_BITS(chip->regs.mspr.tcf, chip_info->controller.msp.data_size , MSP_TCF_MASK_TP1ELEN, 0);
+
+ /**** SRG Reg Config *****/
+ SPI_REG_WRITE_BITS(chip->regs.mspr.srg, sckdiv , MSP_SRG_MASK_SCKDIV , 0);
+
+ /* Save controller_state */
+ spi_set_ctldata(spi, chip);
+ return status;
+
+err_tx_clbk_request:
+ if (chip->dma_info->tx_dmach != -1) {
+ free_dma(chip->dma_info->tx_dmach);
+ }
+err_tx_dmach_request:
+err_rx_clbk_request:
+ if (chip->dma_info->rx_dmach != -1) {
+ free_dma(chip->dma_info->rx_dmach);
+ }
+err_rx_dmach_request:
+ chip->dma_info->tx_dmach = -1;
+ chip->dma_info->rx_dmach = -1;
+err_config_params:
+err_first_setup:
+ if(chip->dma_info)
+ kfree(chip->dma_info);
+ kfree(chip);
+err_request_irq:
+ free_irq(drv_data->adev->irq[0], drv_data);
+err_altfunc_enable:
+ nomadik_gpio_altfuncdisable(drv_data->master_info->gpio_alt_func, drv_data->master_info->device_name);
+err_out:
+ switch(master->bus_num) {
+ case MSP_0_CONTROLLER: if(drv_data->flag_msp0->user == MSP_USER_SPI) {
+ down(&drv_data->flag_msp0->lock);
+ drv_data->flag_msp0->user = MSP_NO_USER;
+ up(&drv_data->flag_msp0->lock);
+ nmdk_dbg("Flag cleanup for MSP0\n");
+ }
+ else {
+ printk("Error in nomadik_spi_cleanup Trying to free MSP from SPI-mode , already configured in mode%d\n", drv_data->flag_msp0->user);
+ status = -EFAULT;
+ }
+ break;
+ case MSP_1_CONTROLLER: if(drv_data->flag_msp1->user == MSP_USER_SPI) {
+ down(&drv_data->flag_msp1->lock);
+ drv_data->flag_msp1->user = MSP_NO_USER;
+ up(&drv_data->flag_msp1->lock);
+ nmdk_dbg("Flag cleanup for MSP1\n");
+ }
+ else {
+ printk("Error in nomadik_spi_cleanup Trying to free MSP from SPI-mode , already configured in mode%d\n", drv_data->flag_msp1->user);
+ status = -EFAULT;
+ }
+ break;
+ case MSP_2_CONTROLLER: if(drv_data->flag_msp2->user == MSP_USER_SPI) {
+ down(&drv_data->flag_msp2->lock);
+ drv_data->flag_msp2->user = MSP_NO_USER;
+ up(&drv_data->flag_msp2->lock);
+ nmdk_dbg("Flag cleanup for MSP2\n");
+ }
+ else {
+ printk("Error in nomadik_spi_cleanup Trying to free MSP from SPI-mode , already configured in mode%d\n", drv_data->flag_msp2->user);
+ status = -EFAULT;
+ }
+ break;
+ }
+
+ return status;
+}
+
+#endif
+
+
+int msp_probe(struct amba_device *adev, void *data)
+{
+ int status = 0;
+ struct device *dev;
+ struct nmdk_spi_master_cntlr *platform_info;
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+ struct spi_master *master;
+ struct driver_data *drv_data = NULL; /*Data for this driver */
+ struct resource *res;
+ int irq;
+#endif
+ dev = &adev->dev;
+ platform_info = (struct nmdk_spi_master_cntlr *)(dev->platform_data);
+ if (platform_info == NULL) {
+ dev_err(&adev->dev, "probe - no platform data supplied\n");
+ status = -ENODEV;
+ goto err_no_pdata;
+ }
+
+ if(platform_info->id == MSP_0_CONTROLLER) {
+ flag_msp0= kmalloc(sizeof(msp_flag), GFP_KERNEL);
+ if(!flag_msp0) {
+ status = -ENOMEM;
+ printk(KERN_ERR "No mem available for MSP0 flag\n");
+ goto err_msp0;
+ }
+ flag_msp0->user = MSP_NO_USER;
+ init_MUTEX(&flag_msp0->lock);
+ init_waitqueue_head(&wait[0]);
+ nmdk_dbg("In msp_probe flag_msp0 is %d\n", flag_msp0->user);
+ }
+ if(platform_info->id == MSP_1_CONTROLLER) {
+ flag_msp1= kmalloc(sizeof(msp_flag), GFP_KERNEL);
+ if(!flag_msp1) {
+ status = -ENOMEM;
+ printk(KERN_ERR "No mem available for MSP1 flag\n");
+ goto err_msp1;
+ }
+ flag_msp1->user = MSP_NO_USER;
+ init_MUTEX(&flag_msp1->lock);
+ init_waitqueue_head(&wait[1]);
+ nmdk_dbg("In msp_probe flag_msp1 is %d\n", flag_msp1->user);
+ }
+ if(platform_info->id == MSP_2_CONTROLLER) {
+ flag_msp2= kmalloc(sizeof(msp_flag), GFP_KERNEL);
+ if(!flag_msp2) {
+ status = -ENOMEM;
+ printk(KERN_ERR "No mem available for MSP2 flag\n");
+ goto err_msp2;
+ }
+ flag_msp2->user = MSP_NO_USER;
+ init_MUTEX(&flag_msp2->lock);
+ init_waitqueue_head(&wait[2]);
+ nmdk_dbg("In msp_probe flag_msp2 is %d\n", flag_msp2->user);
+ }
+ nmdk_dbg_ftrace();
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+ /* Allocate master with space for drv_data */
+ master = spi_alloc_master(dev, sizeof(struct driver_data));
+ if (master == NULL) {
+ dev_err(&adev->dev, "probe - cannot alloc spi_master\n");
+ status = -ENOMEM;
+ goto err_no_mem;
+ }
+
+ drv_data = spi_master_get_devdata(master);
+ drv_data->master = master;
+ drv_data->master_info = platform_info;
+ drv_data->adev = adev;
+
+ drv_data->dma_ongoing = 0;
+
+ /*Fetch the Resources, using platform data */
+
+ res = &(adev->res);
+ if (res == NULL) {
+ dev_err(&adev->dev, "probe - MEM resources not defined\n");
+ status = -ENODEV;
+ goto err_no_iores;
+ }
+ /*Get Hold of Device Register Area... */
+ drv_data->regs = ioremap(res->start, (res->end - res->start));
+ if (drv_data->regs == NULL) {
+ status = -ENODEV;
+ goto err_no_iores;
+ }
+ irq = adev->irq[0];
+ if (irq <= 0) {
+ status = -ENODEV;
+ goto err_no_iores;
+ }
+
+ /*Set flag for MSPx*/
+ switch(platform_info->id) {
+ case MSP_0_CONTROLLER:
+ drv_data->flag_msp0 = (spi_msp_user *)flag_msp0;
+ break;
+ case MSP_1_CONTROLLER:
+ drv_data->flag_msp1 = (spi_msp_user *)flag_msp1;
+ break;
+ case MSP_2_CONTROLLER:
+ drv_data->flag_msp2 = (spi_msp_user *)flag_msp2;
+ break;
+ default:
+ dev_err(&adev->dev, "unknown controller Id %d\n", platform_info->id);
+ status = -EINVAL;
+ break;
+ }
+
+ if(status == -EINVAL)
+ goto err_no_irqres;
+
+ nmdk_dbg(":::: MSP Controller = %d\n", platform_info->id);
+ drv_data->execute_cmd = msp_controller_cmd;
+ drv_data->execute_cmd(drv_data, LOAD_DEFAULT_CONFIG);
+ master->setup = nomadik_msp_setup;
+
+ /*Required Info for an SPI controller */
+ /*Bus Number Which has been Assigned to this SPI controller on this board */
+ master->bus_num = (u16) platform_info->id;
+ master->num_chipselect = platform_info->num_chipselect;
+ master->cleanup = nomadik_spi_cleanup;
+ master->transfer = nomadik_spi_transfer;
+
+ nmdk_dbg(":::: BUSNO: %d\n", master->bus_num);
+ /* Initialize and start queue */
+ status = init_queue(drv_data);
+ if (status != 0) {
+ dev_err(&adev->dev, "probe - problem initializing queue\n");
+ goto err_init_queue;
+ }
+ status = start_queue(drv_data);
+ if (status != 0) {
+ dev_err(&adev->dev, "probe - problem starting queue\n");
+ goto err_start_queue;
+ }
+ /*Initialize tasklet for DMA transfer*/
+ tasklet_init(&drv_data->spi_dma_tasklet, nomadik_spi_tasklet,
+ (unsigned long)drv_data);
+
+ /* Register with the SPI framework */
+ platform_set_drvdata(adev, drv_data);
+ status = spi_register_master(master);
+ if (status != 0) {
+ dev_err(&adev->dev, "probe - problem registering spi master\n");
+ goto err_spi_register;
+ }
+ dev_dbg(dev, "probe succeded\n");
+ nmdk_dbg(" Bus Number = %d, IRQ Line = %d, Virtual Addr: %x\n", master->bus_num, irq, (u32)(drv_data->regs) );
+ return 0;
+#endif
+ return status;
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+ err_init_queue:
+ err_start_queue:
+ err_spi_register:
+ destroy_queue(drv_data);
+ err_no_irqres:
+ err_no_iores:
+ spi_master_put(master);
+ err_no_mem:
+#endif
+ if((flag_msp2) && (platform_info->id == MSP_2_CONTROLLER))
+ kfree(flag_msp2);
+ err_msp2:
+ if((flag_msp1) && (platform_info->id == MSP_1_CONTROLLER))
+ kfree(flag_msp1);
+ err_msp1:
+ if((flag_msp0) && (platform_info->id == MSP_0_CONTROLLER))
+ kfree(flag_msp0);
+ err_msp0:
+ err_no_pdata:
+ return status;
+
+}
+
+static int msp_remove(struct amba_device *adev)
+{
+ struct driver_data *drv_data = platform_get_drvdata(adev);
+ struct device *dev = &adev->dev;
+ struct nmdk_spi_master_cntlr *platform_info;
+ int irq;
+ int status = 0;
+ if (!drv_data)
+ return 0;
+
+ platform_info = dev->platform_data;
+
+#if (defined(CONFIG_NOMADIK_SPI) || defined(CONFIG_NOMADIK_SPI_MODULE))
+ /* Remove the queue */
+ status = destroy_queue(drv_data);
+ if (status != 0) {
+ dev_err(&adev->dev, "queue remove failed (%d)\n", status);
+ return status;
+ }
+ drv_data->execute_cmd(drv_data, LOAD_DEFAULT_CONFIG);
+
+ irq = adev->irq[0];
+ if (irq >= 0)
+ free_irq(irq, drv_data);
+
+ /* Release map resources */
+ iounmap(drv_data->regs);
+ tasklet_disable(&drv_data->pump_transfers);
+ tasklet_kill(&drv_data->spi_dma_tasklet);
+ nomadik_gpio_altfuncdisable(platform_info->gpio_alt_func, platform_info->device_name);
+
+ /* Disconnect from the SPI framework */
+ spi_unregister_master(drv_data->master);
+ spi_master_put(drv_data->master);
+
+ /* Prevent double remove */
+ platform_set_drvdata(adev, NULL);
+ dev_dbg(&adev->dev, "remove succeded\n");
+#endif
+ if(platform_info->id == MSP_0_CONTROLLER) {
+ if(flag_msp0)
+ kfree(flag_msp0);
+ else
+ printk("MSP Error:why flag_msp0==NULL???");
+ }
+ if(platform_info->id == MSP_1_CONTROLLER) {
+ if(flag_msp1)
+ kfree(flag_msp1);
+ else
+ printk("MSP Error:why flag_msp1==NULL???");
+ }
+ if(platform_info->id == MSP_2_CONTROLLER) {
+ if(flag_msp2)
+ kfree(flag_msp2);
+ else
+ printk("MSP Error:why flag_msp2==NULL???");
+ }
+
+ return 0;
+}
+
+static struct amba_id msp_ids[] = {
+ {
+ .id = MSP_PER_ID,
+ .mask = MSP_PER_MASK,
+ },
+ {0, 0},
+};
+
+static struct amba_driver msp_driver = {
+ .drv = {
+ .name = "MSP",
+ },
+ .id_table = msp_ids,
+ .probe = msp_probe,
+ .remove = msp_remove
+};
+
+EXPORT_SYMBOL(nomadik_msp_configure);
+EXPORT_SYMBOL(nomadik_msp_send_data);
+EXPORT_SYMBOL(nomadik_msp_receive_data);
+EXPORT_SYMBOL(nomadik_msp_transceive_data);
+EXPORT_SYMBOL(nomadik_msp_enable);
+EXPORT_SYMBOL(nomadik_msp_disable);
+EXPORT_SYMBOL(nomadik_msp_flush_input);
+
+static int __init nomadik_msp_mod_init(void)
+{
+ return amba_driver_register(&msp_driver);
+}
+
+static void __exit nomadik_msp_exit(void)
+{
+ amba_driver_unregister(&msp_driver);
+ return;
+}
+module_init(nomadik_msp_mod_init);
+module_exit(nomadik_msp_exit);
+
+MODULE_AUTHOR("STMicroelectronics Pvt Ltd");
+MODULE_DESCRIPTION("NOMADIK MSP driver");
+MODULE_LICENSE("GPL");
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/msp.h
@@ -0,0 +1,383 @@
+/*linux/drivers/char/nomadik-msp.h
+ *
+ * Driver for Nomadik STN8810 MSP device. Note that this module MUST NOT
+ * attempt to load before the i2c and gpio drivers are loaded.
+ *
+ * Copyright 2006 STMicroelectronics Pvt. Ltd.
+ *
+ * This program is free sofstware; 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.
+ *
+ */
+
+#ifndef NMDK_MSP_HEADER
+#define NMDK_MSP_HEADER
+
+struct msp_register
+{
+ u32 fifo;
+ u32 global_ctrl;
+ u32 tx_config;
+ u32 rx_config;
+ u32 srg_ctrl;
+ u32 status;
+ u32 dma_ctrl;
+ u32 reserved0;
+ u32 irq_mask;
+ u32 raw_irq_status;
+ u32 masked_irq_status;
+ u32 irq_clear;
+ u32 multichannel_ctrl;
+ u32 rx_compare_val;
+ u32 rx_compare_mask;
+ u32 reserved1;
+ u32 tx_enable_ch0;
+ u32 tx_enable_ch1;
+ u32 tx_enable_ch2;
+ u32 tx_enable_ch3;
+ u32 reserved2[4];
+ u32 rx_enable_ch0;
+ u32 rx_enable_ch1;
+ u32 rx_enable_ch2;
+ u32 rx_enable_ch3;
+ u32 reserved3[4];
+ u32 test_ctrl;
+ u32 integration_test_input;
+ u32 integration_test_output;
+ u32 test_data;
+};
+
+struct msp_context {
+ u8 direction;
+ u8 mode;
+ u8 protocol;
+ int frame_freq;
+ int frame_size;
+ enum msp_data_size requested_data_size;
+ enum msp_data_size actual_data_size;
+
+ u32 rx_channel_0_enable;
+ u32 rx_channel_1_enable;
+ u32 rx_channel_2_enable;
+ u32 rx_channel_3_enable;
+ u32 tx_channel_0_enable;
+ u32 tx_channel_1_enable;
+ u32 tx_channel_2_enable;
+ u32 tx_channel_3_enable;
+ u32 multichannel_ctrl_reg;
+ u32 rx_compare_mask_reg;
+ u32 irq_mask_reg;
+
+ u8 compression_mode;
+ u8 expansion_mode;
+ u8 coprocessor_mode;
+ int msp_disable;
+};
+
+ struct msp_mode_status
+{
+ int work_mode;
+ int phase_mode;
+ int stereo_mode;
+ volatile u16 *it_mono_data_flow;
+ volatile u32 *it_stereo_data_flow;
+ volatile u32 it_halfwords_count;
+ volatile u32 flow_error_count;
+} msp_mode_status;
+
+
+/* Single or dual phase mode */
+enum
+{
+ MSP_SINGLE_PHASE,
+ MSP_DUAL_PHASE
+};
+
+
+/* Transmit/Receive shifter status
+-----------------------------------*/
+enum
+{
+ MSP_SxHIFTER_IDLE = 0,
+ MSP_SHIFTER_WORKING = 1
+};
+
+
+/* Transmit/Receive FIFO status
+---------------------------------*/
+enum
+{
+ MSP_FIFO_FULL,
+ MSP_FIFO_PART_FILLED,
+ MSP_FIFO_EMPTY
+};
+
+
+/* Frame length
+------------------*/
+enum
+{
+ MSP_FRAME_LENGTH_1 = 0,
+ MSP_FRAME_LENGTH_2 = 1,
+ MSP_FRAME_LENGTH_4 = 3,
+ MSP_FRAME_LENGTH_8 = 7,
+ MSP_FRAME_LENGTH_12 = 11,
+ MSP_FRAME_LENGTH_16 = 15,
+ MSP_FRAME_LENGTH_20 = 19,
+ MSP_FRAME_LENGTH_32 = 31,
+ MSP_FRAME_LENGTH_48 = 47,
+ MSP_FRAME_LENGTH_64 = 63
+};
+
+/* Element length */
+enum
+{
+ MSP_ELEM_LENGTH_8 = 0,
+ MSP_ELEM_LENGTH_10 = 1,
+ MSP_ELEM_LENGTH_12 = 2,
+ MSP_ELEM_LENGTH_14 = 3,
+ MSP_ELEM_LENGTH_16 = 4,
+ MSP_ELEM_LENGTH_20 = 5,
+ MSP_ELEM_LENGTH_24 = 6,
+ MSP_ELEM_LENGTH_32 = 7
+};
+
+
+/* Data delay (in bit clock cycles)
+---------------------------------------*/
+enum
+{
+ MSP_DELAY_0 = 0,
+ MSP_DELAY_1 = 1,
+ MSP_DELAY_2 = 2,
+ MSP_DELAY_3 = 3
+};
+
+
+/* Configurations of clocks (transmit, receive or sample rate generator)
+-------------------------------------------------------------------------*/
+enum
+{
+ MSP_RISING_EDGE = 0,
+ MSP_FALLING_EDGE = 1
+};
+
+/* Protocol dependant parameters list */
+struct msp_protocol_desc
+{
+ u32 phase_mode;
+ u32 frame_len_1;
+ u32 frame_len_2;
+ u32 element_len_1;
+ u32 element_len_2;
+ u32 data_delay;
+ u32 tx_clock_edge;
+ u32 rx_clock_edge;
+};
+
+#define RX_ENABLE_MASK 0x00000001
+#define RX_FIFO_ENABLE_MASK 0x00000002
+#define RX_FRAME_SYNC_MASK 0x00000004
+#define DIRECT_COMPANDING_MASK 0x00000008
+#define RX_SYNC_SEL_MASK 0x00000010
+#define RX_CLK_POL_MASK 0x00000020
+#define RX_CLK_SEL_MASK 0x00000040
+#define LOOPBACK_MASK 0x00000080
+#define TX_ENABLE_MASK 0x00000100
+#define TX_FIFO_ENABLE_MASK 0x00000200
+#define TX_FRAME_SYNC_MASK 0x00000400
+#define TX_SYNC_SEL_MASK 0x00001800
+#define TX_CLK_POL_MASK 0x00002000
+#define TX_CLK_SEL_MASK 0x00004000
+#define TX_EXTRA_DELAY_MASK 0x00008000
+#define SRG_ENABLE_MASK 0x00010000
+#define SRG_CLK_POL_MASK 0x00020000
+#define SRG_CLK_SEL_MASK 0x000C0000
+#define FRAME_GEN_EN_MASK 0x00100000
+#define SPI_CLK_MODE_MASK 0x00600000
+#define SPI_BURST_MODE_MASK 0x00800000
+
+#define RXEN_BIT 0
+#define RFFEN_BIT 1
+#define RFSPOL_BIT 2
+#define DCM_BIT 3
+#define RFSSEL_BIT 4
+#define RCKPOL_BIT 5
+#define RCKSEL_BIT 6
+#define LBM_BIT 7
+#define TXEN_BIT 8
+#define TFFEN_BIT 9
+#define TFSPOL_BIT 10
+#define TFSSEL_BIT 11
+#define TCKPOL_BIT 13
+#define TCKSEL_BIT 14
+#define TXDDL_BIT 15
+#define SGEN_BIT 16
+#define SCKPOL_BIT 17
+#define SCKSEL_BIT 18
+#define FGEN_BIT 20
+#define SPICKM_BIT 21
+
+#define msp_rx_clkpol_bit(n) ((n & 1) << RCKPOL_BIT)
+#define msp_tx_clkpol_bit(n) ((n & 1) << TCKPOL_BIT)
+#define msp_spi_clk_mode_bits(n) ((n & 3) << SPICKM_BIT)
+
+
+/* Use this to clear the clock mode bits to non-spi */
+#define MSP_NON_SPI_CLK_MASK 0x00600000
+
+#define P1ELEN_BIT 0
+#define P1FLEN_BIT 3
+#define DTYP_BIT 10
+#define ENDN_BIT 12
+#define DDLY_BIT 13
+#define FSIG_BIT 15
+#define P2ELEN_BIT 16
+#define P2FLEN_BIT 19
+#define P2SM_BIT 26
+#define P2EN_BIT 27
+
+#define msp_p1_elem_len_bits(n) (n & 0x00000007)
+#define msp_p2_elem_len_bits(n) (((n) << P2ELEN_BIT) & 0x00070000)
+#define msp_p1_frame_len_bits(n) (((n) << P1FLEN_BIT) & 0x00000378)
+#define msp_p2_frame_len_bits(n) (((n) << P2FLEN_BIT) & 0x03780000)
+#define msp_data_delay_bits(n) (((n) << DDLY_BIT) & 0x00003000)
+#define msp_data_type_bits(n) (((n) << DTYP_BIT) & 0x00000600)
+#define msp_p2_start_mode_bit(n) (n << P2SM_BIT)
+#define msp_p2_enable_bit(n) (n << P2EN_BIT)
+
+/* Flag register
+--------------------*/
+#define RX_BUSY 0x00000001
+#define RX_FIFO_EMPTY 0x00000002
+#define RX_FIFO_FULL 0x00000004
+#define TX_BUSY 0x00000008
+#define TX_FIFO_EMPTY 0x00000010
+#define TX_FIFO_FULL 0x00000020
+
+#define RBUSY_BIT 0
+#define RFE_BIT 1
+#define RFU_BIT 2
+#define TBUSY_BIT 3
+#define TFE_BIT 4
+#define TFU_BIT 5
+
+/* Multichannel control register
+---------------------------------*/
+#define RMCEN_BIT 0
+#define RMCSF_BIT 1
+#define RCMPM_BIT 3
+#define TMCEN_BIT 5
+#define TNCSF_BIT 6
+
+/* Sample rate generator register
+------------------------------------*/
+#define SCKDIV_BIT 0
+#define FRWID_BIT 10
+#define FRPER_BIT 16
+
+#define SCK_DIV_MASK 0x0000003FF
+#define frame_width_bits(n) (((n) << FRWID_BIT) &0x0000FC00)
+#define frame_period_bits(n) (((n) << FRPER_BIT) &0x1FFF0000)
+
+
+/* DMA controller register
+---------------------------*/
+#define RX_DMA_ENABLE 0x00000001
+#define TX_DMA_ENABLE 0x00000002
+
+#define RDMAE_BIT 0
+#define TDMAE_BIT 1
+
+/*Interrupt Register
+-----------------------------------------*/
+#define RECEIVE_SERVICE_INT 0x00000001
+#define RECEIVE_OVERRUN_ERROR_INT 0x00000002
+#define RECEIVE_FRAME_SYNC_ERR_INT 0x00000004
+#define RECEIVE_FRAME_SYNC_INT 0x00000008
+#define TRANSMIT_SERVICE_INT 0x00000010
+#define TRANSMIT_UNDERRUN_ERR_INT 0x00000020
+#define TRANSMIT_FRAME_SYNC_ERR_INT 0x00000040
+#define TRANSMIT_FRAME_SYNC_INT 0x00000080
+#define ALL_INT 0x000000ff
+
+/* Protocol configuration values
+* I2S: Single phase, 16 bits, 2 words per frame
+-----------------------------------------------*/
+#define I2S_PROTOCOL_DESC \
+{ \
+ MSP_SINGLE_PHASE, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_ELEM_LENGTH_32, \
+ MSP_ELEM_LENGTH_32, \
+ MSP_DELAY_1, \
+ MSP_FALLING_EDGE, \
+ MSP_FALLING_EDGE \
+}
+
+/* Companded PCM: Single phase, 8 bits, 1 word per frame
+--------------------------------------------------------*/
+#define PCM_COMPAND_PROTOCOL_DESC \
+{ \
+ MSP_SINGLE_PHASE, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_DELAY_0, \
+ MSP_RISING_EDGE, \
+ MSP_FALLING_EDGE \
+}
+
+/* AC97: Double phase, 1 element of 16 bits during first phase,
+* 12 elements of 20 bits in second phase.
+--------------------------------------------------------------*/
+#define AC97_PROTOCOL_DESC \
+{ \
+ MSP_DUAL_PHASE, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_FRAME_LENGTH_12, \
+ MSP_ELEM_LENGTH_16, \
+ MSP_ELEM_LENGTH_20, \
+ MSP_DELAY_1, \
+ MSP_RISING_EDGE, \
+ MSP_FALLING_EDGE \
+}
+
+#define SPI_MASTER_PROTOCOL_DESC \
+{ \
+ MSP_SINGLE_PHASE, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_DELAY_1, \
+ MSP_FALLING_EDGE, \
+ MSP_RISING_EDGE \
+}
+#define SPI_SLAVE_PROTOCOL_DESC \
+{ \
+ MSP_SINGLE_PHASE, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_FRAME_LENGTH_1, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_ELEM_LENGTH_8, \
+ MSP_DELAY_1, \
+ MSP_FALLING_EDGE, \
+ MSP_RISING_EDGE \
+}
+#define FUNC_MSP0 GPIO_ALT_MSP_0
+#define FUNC_MSP1 GPIO_ALT_MSP_1
+#define FUNC_MSP2 GPIO_ALT_MSP_2
+
+#define MSP_FRAME_PERIOD_IN_MONO_MODE 256
+#define MSP_FRAME_PERIOD_IN_STEREO_MODE 32
+#define MSP_FRAME_WIDTH_IN_STEREO_MODE 16
+
+#define MSP_COUNT 3
+
+#endif
+
--- /dev/null
+++ linux-2.6.20/arch/arm/mach-nomadik/mtu.c
@@ -0,0 +1,589 @@
+/*
+ * Multiple Timer Unit (MTU) driver.
+ * Written by Vinayak Pane
+ *
+ * Nomadik MTU driver.
+ *
+ * This driver provides an interface for device drivers to utilize both MTUs.
+ * which includes total 8 timers, Those can be registered against various purposes
+ * within kernel.
+ * It keeps track of used & unused timer units. It handles MTU interrupts
+ * & their respective multiplexing.
+ *
+ * NOTE:
+ * This device is NOT registered with amba bus device -:
+ * Even though this driver should be registered with AMBA bus devices,
+ * we cant do this becasue of Amba driver initialised/probed sequence issue.
+ * MTU is used as underlying part of system timer. The system timer
+ * is initialised and used very early before the actual Amba devices
+ * are initialised/probed. Therefore this probe function is not invoked
+ * before the system timer is initialised!!
+ * However we can catergories this driver in platform/system drivers.
+ */
+
+#include
+#include
+#include
+#include
+#include