mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-01-12 17:40:43 +00:00
Compare commits
2 Commits
ti2018.00-
...
split
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88867c1d96 | ||
|
|
a1e2573369 |
11
README
11
README
@@ -8,7 +8,13 @@ This layer depends on:
|
||||
|
||||
URI: git://git.openembedded.org/openembedded-core
|
||||
layers: meta
|
||||
branch: rocko
|
||||
branch: master
|
||||
|
||||
|
||||
When not depending on meta-openembedded and not using systemd, you may need to
|
||||
mask few miscellaneous recipes requiring systemd, by adding this to local.conf:
|
||||
|
||||
BBMASK = "meta-ti/recipes-misc"
|
||||
|
||||
|
||||
The base BSP part of meta-ti should work with different OpenEmbedded/Yocto
|
||||
@@ -19,7 +25,6 @@ Please follow the recommended setup procedures of your OE distribution.
|
||||
|
||||
|
||||
Send pull requests, patches, comments or questions to meta-ti@yoctoproject.org
|
||||
Please note - meta-ti mailing list requires subscription for posting:
|
||||
https://lists.yoctoproject.org/listinfo/meta-ti
|
||||
|
||||
Maintainers: Denys Dmytriyenko <denys@ti.com>
|
||||
Koen Kooi <koen@dominion.thruhere.net>
|
||||
|
||||
156
classes/sdcard_image.bbclass
Normal file
156
classes/sdcard_image.bbclass
Normal file
@@ -0,0 +1,156 @@
|
||||
inherit image
|
||||
|
||||
# Add the fstypes we need
|
||||
IMAGE_FSTYPES_append = " tar.bz2 sdimg"
|
||||
|
||||
# Ensure required utilities are present
|
||||
IMAGE_DEPENDS_sdimg = "genext2fs-native e2fsprogs-native"
|
||||
|
||||
# Change this to match your host distro
|
||||
LOSETUP ?= "/sbin/losetup"
|
||||
|
||||
# Since these need to go in /etc/fstab we can hardcode them
|
||||
# Since the vars are weakly assigned, you can override them from your local.conf
|
||||
LOOPDEV ?= "/dev/loop1"
|
||||
LOOPDEV_BOOT ?= "/dev/loop2"
|
||||
LOOPDEV_FS ?= "/dev/loop3"
|
||||
|
||||
# Default to 4GiB images
|
||||
SDIMG_SIZE ?= "444"
|
||||
|
||||
# FS type for rootfs
|
||||
ROOTFSTYPE ?= "ext4"
|
||||
|
||||
BOOTPARTNAME_beaglebone = "BEAGLE_BONE"
|
||||
BOOTPARTNAME ?= "${MACHINE}"
|
||||
|
||||
IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
|
||||
|
||||
# Files and/or directories to be copied into the vfat partition
|
||||
FATPAYLOAD ?= ""
|
||||
|
||||
IMAGE_CMD_sdimg () {
|
||||
SDIMG=${WORKDIR}/sd.img
|
||||
|
||||
# sanity check fstab entry for boot partition mounting
|
||||
if [ "x$(cat /etc/fstab | grep ${LOOPDEV_BOOT} | grep ${WORKDIR}/tmp-mnt-boot | grep user || true)" = "x" ]; then
|
||||
echo "/etc/fstab entries need to be created with the user flag for the loop devices like:"
|
||||
echo "${LOOPDEV_BOOT} ${WORKDIR}/tmp-mnt-boot vfat user 0 0"
|
||||
false
|
||||
fi
|
||||
|
||||
# cleanup loops
|
||||
for loop in ${LOOPDEV} ${LOOPDEV_BOOT} ${LOOPDEV_FS} ; do
|
||||
${LOSETUP} -d $loop || true
|
||||
done
|
||||
|
||||
# If an SD image is already present, reuse and reformat it
|
||||
if [ ! -e ${SDIMG} ] ; then
|
||||
dd if=/dev/zero of=${SDIMG} bs=$(echo '255 * 63 * 512' | bc) count=${SDIMG_SIZE}
|
||||
fi
|
||||
|
||||
${LOSETUP} ${LOOPDEV} ${SDIMG}
|
||||
|
||||
# Create partition table
|
||||
dd if=/dev/zero of=${LOOPDEV} bs=1024 count=1024
|
||||
SIZE=$(/sbin/fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}')
|
||||
CYLINDERS=$(echo $SIZE/255/63/512 | bc)
|
||||
{
|
||||
echo ,9,0x0C,*
|
||||
echo ,,,-
|
||||
} | /sbin/sfdisk -D -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV}
|
||||
|
||||
# Prepare loop devices for boot and filesystem partitions
|
||||
BOOT_OFFSET=32256
|
||||
FS_OFFSET_SECT=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep Linux | perl -p -i -e "s/\s+/ /"|cut -d " " -f 2)
|
||||
FS_OFFSET=$(echo "$FS_OFFSET_SECT * 512" | bc)
|
||||
FS_SIZE_BLOCKS=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep Linux | perl -p -i -e "s/\s+/ /g" \
|
||||
|cut -d " " -f 4 | cut -d "+" -f 1)
|
||||
|
||||
LOOPDEV_BLOCKS=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep FAT | perl -p -i -e "s/\s+/ /g"|cut -d " " -f 5)
|
||||
LOOPDEV_BYTES=$(echo "$LOOPDEV_BLOCKS * 1024" | bc)
|
||||
|
||||
${LOSETUP} -d ${LOOPDEV}
|
||||
|
||||
${LOSETUP} ${LOOPDEV_BOOT} ${SDIMG} -o ${BOOT_OFFSET}
|
||||
|
||||
/sbin/mkfs.vfat ${LOOPDEV_BOOT} -n ${BOOTPARTNAME} $LOOPDEV_BLOCKS
|
||||
|
||||
# Prepare filesystem partition
|
||||
# Copy ubi used by flashing scripts
|
||||
if [ -e ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ] ; then
|
||||
echo "Copying UBIFS image to file system"
|
||||
cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${IMAGE_ROOTFS}/boot/fs.ubi
|
||||
fi
|
||||
|
||||
# Prepare boot partion. First mount the boot partition, and copy the boot loader and supporting files
|
||||
# from the root filesystem
|
||||
|
||||
mkdir -p ${WORKDIR}/tmp-mnt-boot
|
||||
mount $LOOPDEV_BOOT ${WORKDIR}/tmp-mnt-boot
|
||||
|
||||
echo "Copying bootloaders into the boot partition"
|
||||
if [ -e ${IMAGE_ROOTFS}/boot/MLO ] ; then
|
||||
cp -v ${IMAGE_ROOTFS}/boot/MLO ${WORKDIR}/tmp-mnt-boot
|
||||
else
|
||||
cp -v ${DEPLOY_DIR_IMAGE}/MLO ${WORKDIR}/tmp-mnt-boot
|
||||
fi
|
||||
|
||||
# Check for u-boot SPL
|
||||
if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.img ] ; then
|
||||
suffix=img
|
||||
else
|
||||
suffix=bin
|
||||
fi
|
||||
|
||||
cp -v ${IMAGE_ROOTFS}/boot/uEnv.txt ${WORKDIR}/tmp-mnt-boot || true
|
||||
cp -v ${IMAGE_ROOTFS}/boot/user.txt ${WORKDIR}/tmp-mnt-boot || true
|
||||
cp -v ${IMAGE_ROOTFS}/boot/uImage ${WORKDIR}/tmp-mnt-boot || true
|
||||
|
||||
if [ -e ${IMAGE_ROOTFS}/boot/u-boot.$suffix ] ; then
|
||||
cp -v ${IMAGE_ROOTFS}/boot/{u-boot.$suffix} ${WORKDIR}/tmp-mnt-boot || true
|
||||
else
|
||||
cp -v ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.$suffix ${WORKDIR}/tmp-mnt-boot/u-boot.$suffix
|
||||
fi
|
||||
|
||||
if [ -n ${FATPAYLOAD} ] ; then
|
||||
echo "Copying payload into VFAT"
|
||||
for entry in ${FATPAYLOAD} ; do
|
||||
# add the || true to stop aborting on vfat issues like not supporting .~lock files
|
||||
cp -av ${IMAGE_ROOTFS}$entry ${WORKDIR}/tmp-mnt-boot || true
|
||||
done
|
||||
fi
|
||||
|
||||
echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${IMAGE_ROOTFS}/etc/image-version-info
|
||||
|
||||
# Cleanup VFAT mount
|
||||
echo "Cleaning up VFAT mount"
|
||||
umount ${WORKDIR}/tmp-mnt-boot
|
||||
${LOSETUP} -d ${LOOPDEV_BOOT} || true
|
||||
|
||||
# Prepare rootfs parition
|
||||
echo "Creating rootfs loopback"
|
||||
${LOSETUP} ${LOOPDEV_FS} ${SDIMG} -o ${FS_OFFSET}
|
||||
|
||||
FS_NUM_INODES=$(echo $FS_SIZE_BLOCKS / 4 | bc)
|
||||
|
||||
case "${ROOTFSTYPE}" in
|
||||
ext3)
|
||||
genext2fs -z -N $FS_NUM_INODES -b $FS_SIZE_BLOCKS -d ${IMAGE_ROOTFS} ${LOOPDEV_FS}
|
||||
tune2fs -L ${IMAGE_NAME} -j ${LOOPDEV_FS}
|
||||
;;
|
||||
ext4)
|
||||
genext2fs -z -N $FS_NUM_INODES -b $FS_SIZE_BLOCKS -d ${IMAGE_ROOTFS} ${LOOPDEV_FS}
|
||||
tune2fs -L ${IMAGE_NAME} -j -O extents,uninit_bg,dir_index ${LOOPDEV_FS}
|
||||
;;
|
||||
*)
|
||||
echo "Please set ROOTFSTYPE to something supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
${LOSETUP} -d ${LOOPDEV_FS} || true
|
||||
|
||||
gzip -c ${WORKDIR}/sd.img > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-${IMAGEDATESTAMP}.img.gz
|
||||
rm -f ${WORKDIR}/sd.img
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
require recipes-ti/includes/ti-paths.inc
|
||||
require recipes-ti/includes/ti-staging.inc
|
||||
|
||||
inherit perlnative
|
||||
|
||||
DEPENDS = "ti-xdctools-native ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native ti-cgt6x-native ti-cgt-pru-native ti-pdk-build-rtos doxygen-native"
|
||||
|
||||
DEPENDS_append_omap-a15 = " ti-cgt-arm-native"
|
||||
DEPENDS_remove_ti33x = "ti-cgt6x-native"
|
||||
DEPENDS_remove_ti43x = "ti-cgt6x-native"
|
||||
DEPENDS_append_omapl1 = " ti-cgt-arm-native"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
# HTML hyperlink text
|
||||
PDK_COMP_LINK_TEXT ?= ""
|
||||
|
||||
DOC_FILE = "API_Documentation_${PN}.html"
|
||||
|
||||
create_doc_link () {
|
||||
PDK_COMP_DIR=`get_build_dir_bash`
|
||||
|
||||
echo "<a href=\"${PDK_COMP_DIR}/docs/doxygen/html/index.html\">${PDK_COMP_LINK_TEXT}</a>" >> ${D}${PDK_INSTALL_DIR_RECIPE}/packages/.extras/doc/${DOC_FILE}
|
||||
}
|
||||
|
||||
get_build_dir_bash() {
|
||||
if [ -f ${S}/package.xdc ]
|
||||
then
|
||||
grep '^package' ${S}/package.xdc | sed -e 's|\[.*$||' | awk '{ print $2 }' | sed -e 's|\.|/|g'
|
||||
else
|
||||
echo ${S}
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
export CROSS_TOOL_PRFX="arm-none-eabi-"
|
||||
export TOOLCHAIN_PATH_A8 = "${GCC_ARM_NONE_TOOLCHAIN}"
|
||||
export TOOLCHAIN_PATH_A9 = "${GCC_ARM_NONE_TOOLCHAIN}"
|
||||
export TOOLCHAIN_PATH_A15 = "${GCC_ARM_NONE_TOOLCHAIN}"
|
||||
export TOOLCHAIN_PATH_M4 = "${M4_TOOLCHAIN_INSTALL_DIR}"
|
||||
export TOOLCHAIN_PATH_Arm9 = "${M4_TOOLCHAIN_INSTALL_DIR}"
|
||||
export C6X_GEN_INSTALL_PATH = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x"
|
||||
export CL_PRU_INSTALL_PATH = "${TI_CGT_PRU_INSTALL_DIR}"
|
||||
|
||||
export ROOTDIR = "${B}"
|
||||
export BIOS_INSTALL_PATH = "${SYSBIOS_INSTALL_DIR}"
|
||||
export XDC_INSTALL_PATH = "${XDC_INSTALL_DIR}"
|
||||
export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
|
||||
|
||||
export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages"
|
||||
export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl"
|
||||
|
||||
TI_PDK_XDCMAKE ?= "1"
|
||||
|
||||
# By default, only build the cores with available toolchains
|
||||
TI_PDK_LIMIT_CORES ?= "a15_0 ipu1_0 ipu1_1 ipu2_0 ipu2_1 c66x c66xdsp_1 c66xdsp_2 arm9_0 c674x a9host a8host pru_0 pru_1"
|
||||
TI_PDK_LIMIT_SOCS ?= ""
|
||||
TI_PDK_LIMIT_BOARDS ?= ""
|
||||
TI_PDK_MAKE_TARGET ?= "release"
|
||||
TI_PDK_EXTRA_MAKE ?= ""
|
||||
TI_PDK_DOXYGEN_SUPPORT ?= "1"
|
||||
|
||||
TI_PDK_XDC_ARGS ?= "${TI_PDK_LIMIT_SOCS}"
|
||||
|
||||
PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}"
|
||||
PARALLEL_MAKE = ""
|
||||
|
||||
def get_doxygen_support(d):
|
||||
if d.getVar('TI_PDK_DOXYGEN_SUPPORT', True) == '1':
|
||||
return ''
|
||||
return 'DOXYGEN_SUPPORT=no'
|
||||
|
||||
EXTRA_OEMAKE = " \
|
||||
LIMIT_SOCS="${TI_PDK_LIMIT_SOCS}" \
|
||||
LIMIT_BOARDS="${TI_PDK_LIMIT_BOARDS}" \
|
||||
LIMIT_CORES="${TI_PDK_LIMIT_CORES}" \
|
||||
${TI_PDK_EXTRA_MAKE} \
|
||||
${@get_doxygen_support(d)} \
|
||||
"
|
||||
|
||||
do_configure() {
|
||||
BUILD_DIR=${B}/`get_build_dir_bash`
|
||||
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cp -r ${S}/* ${BUILD_DIR}
|
||||
|
||||
if [ "${TI_PDK_XDCMAKE}" == "1" ]
|
||||
then
|
||||
cd ${BUILD_DIR}
|
||||
|
||||
sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs
|
||||
find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \;
|
||||
find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \;
|
||||
find -name "*.xs" -exec sed -i "/\.chm/d" {} \;
|
||||
find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \;
|
||||
|
||||
cd ${B}
|
||||
${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR .
|
||||
else
|
||||
if [ "${CLEANBROKEN}" != "1" ]
|
||||
then
|
||||
cd ${BUILD_DIR}
|
||||
oe_runmake clean
|
||||
cd "${B}"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
|
||||
if [ "${TI_PDK_XDCMAKE}" == "1" ]
|
||||
then
|
||||
${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${TI_PDK_XDC_ARGS}" ROOTDIR="${ROOTDIR}" -PR .
|
||||
${XDC_INSTALL_DIR}/xdc release XDCARGS="${TI_PDK_XDC_ARGS}" -PR .
|
||||
else
|
||||
BUILD_DIR=${B}/`get_build_dir_bash`
|
||||
cd ${BUILD_DIR}
|
||||
|
||||
oe_runmake ${TI_PDK_MAKE_TARGET}
|
||||
fi
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages
|
||||
find -name "*.tar" -exec tar xf {} --no-same-owner -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages \;
|
||||
|
||||
if [ "${PDK_COMP_LINK_TEXT}" != "" ]
|
||||
then
|
||||
install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/.extras/doc
|
||||
create_doc_link
|
||||
fi
|
||||
}
|
||||
|
||||
FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"
|
||||
@@ -6,26 +6,4 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-ti"
|
||||
BBFILE_PATTERN_meta-ti := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-ti = "6"
|
||||
|
||||
LICENSE_PATH += "${LAYERDIR}/licenses"
|
||||
|
||||
LAYERDEPENDS_meta-ti = "core"
|
||||
|
||||
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
|
||||
ti-sgx-ddk-km \
|
||||
ti-sgx-ddk-um \
|
||||
ti-ipc \
|
||||
ti-ipc-rtos \
|
||||
cmem-mod \
|
||||
hplib-mod \
|
||||
gdbserverproxy-module-drv \
|
||||
debugss-module-drv \
|
||||
uio-module-drv \
|
||||
mpm-transport \
|
||||
cppi-lld \
|
||||
qmss-lld \
|
||||
multiprocmgr \
|
||||
"
|
||||
|
||||
HOSTTOOLS_NONFATAL += "truncate xxd comm"
|
||||
BBFILE_PRIORITY_meta-ti = "10"
|
||||
|
||||
17
conf/machine/am180x-evm.conf
Normal file
17
conf/machine/am180x-evm.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM180x CPUs on an AM180x EVM board
|
||||
#@DESCRIPTION: Machine configuration for the TI AM180x EVM board
|
||||
|
||||
require conf/machine/include/davinci.inc
|
||||
require conf/machine/include/omapl138.inc
|
||||
|
||||
UBOOT_MACHINE = "da850evm_config"
|
||||
UBOOT_ENTRYPOINT = "0xc0008000"
|
||||
UBOOT_LOADADDRESS = "0xc0008000"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 serial ethernet"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omapl138-psp"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
@@ -1,18 +1,22 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM335x EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM335x EVM
|
||||
TARGET_ARCH = "arm"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-video-fbdev"
|
||||
|
||||
GUI_MACHINE_CLASS = "smallscreen"
|
||||
|
||||
require conf/machine/include/ti33x.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
MACHINE_FEATURES += "touchscreen"
|
||||
IMAGE_FSTYPES += "ubi tar.bz2"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
SERIAL_CONSOLE = "115200 ttyO0"
|
||||
|
||||
# Normally AM335 boards use ttyS0, but ICE uses ttyS3, so try both
|
||||
SERIAL_CONSOLE = ""
|
||||
SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS3"
|
||||
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
@@ -25,7 +29,7 @@ SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1988 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 7000"
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 1988"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# from dmesg:
|
||||
@@ -34,3 +38,10 @@ MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 7000"
|
||||
# UBI: sub-page size: 512
|
||||
# UBI: VID header offset: 2048 (aligned 2048)
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "am335x_evm_config"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen touchscreen"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM335x HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM435x HS EVM
|
||||
|
||||
require conf/machine/am335x-evm.conf
|
||||
|
||||
UBOOT_MACHINE = ""
|
||||
# Last config in the list is default
|
||||
UBOOT_CONFIG ??= "uart mmc"
|
||||
UBOOT_CONFIG[uart] = "am335x_hs_evm_uart_config"
|
||||
UBOOT_CONFIG[mmc] = "am335x_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/am3x"
|
||||
@@ -2,19 +2,37 @@
|
||||
#@NAME: AM37x EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM37x EVM
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-tslib \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
GUI_MACHINE_CLASS = "smallscreen"
|
||||
|
||||
require conf/machine/include/omap3.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
MACHINE_FEATURES += "touchscreen ethernet"
|
||||
# Ship all kernel modules
|
||||
|
||||
IMAGE_FSTYPES += "ubi tar.gz"
|
||||
IMAGE_FSTYPES += "jffs2 tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048"
|
||||
|
||||
KERNEL_DEVICETREE = "omap3-evm-37xx.dtb"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap-psp"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "omap3_evm_config"
|
||||
XLOAD_MACHINE = "omap3evm_config"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen touchscreen"
|
||||
|
||||
# NOTE: there are NAND and OneNAND versions of this board...
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
@@ -29,3 +47,4 @@ MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM437x EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM437x EVM
|
||||
|
||||
require conf/machine/include/ti43x.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
MACHINE_FEATURES += "touchscreen"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
# details about this board please see
|
||||
# http://processors.wiki.ti.com/index.php/UBIFS_Support
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 11 -O 4096
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: logical eraseblock size: 253952 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 994 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 4000"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 11 -O 4096
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: physical eraseblock size: 262144 bytes (256 KiB)
|
||||
# UBI: sub-page size: 4096
|
||||
# UBI: VID header offset: 4096 (aligned 4096)
|
||||
UBINIZE_ARGS = "-m 4096 -p 256KiB -s 4096 -O 4096"
|
||||
@@ -1,18 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM437x HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM437x HS EVM
|
||||
|
||||
require conf/machine/am437x-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "am43xx_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/am4x"
|
||||
|
||||
OPTEEMACHINE = "ti"
|
||||
OPTEEFLAVOR = "am43xx"
|
||||
OPTEEOUTPUTMACHINE = "ti"
|
||||
@@ -1,47 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM57xx EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM57xx EVM
|
||||
|
||||
require conf/machine/include/dra7xx.inc
|
||||
|
||||
MACHINE_FEATURES += "touchscreen"
|
||||
|
||||
IMAGE_FSTYPES += "tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
KERNEL_DEVICETREE = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-beagle-x15-revc.dtb \
|
||||
am57xx-evm.dtb am57xx-evm-cam-mt9t111.dtb am57xx-evm-cam-ov10635.dtb \
|
||||
am57xx-evm-reva3.dtb am57xx-evm-reva3-cam-mt9t111.dtb am57xx-evm-reva3-cam-ov10635.dtb \
|
||||
am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb am571x-idk-lcd-osd101t2587.dtb \
|
||||
am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb am572x-idk-lcd-osd101t2587.dtb \
|
||||
am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb"
|
||||
|
||||
KERNEL_DEVICETREE += "${@base_conditional('ENABLE_TI_UIO_DEVICES', '1', 'am574x-idk-pru-excl-uio.dtb am572x-idk-pru-excl-uio.dtb am571x-idk-pru-excl-uio.dtb', '', d)}"
|
||||
|
||||
UBOOT_MACHINE = "am57xx_evm_config"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
# details about this board please see
|
||||
# http://processors.wiki.ti.com/index.php/UBIFS_Support
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1988 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
# UBI: VID header offset: 2048 (aligned 2048)
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "am571x am572x am574x"
|
||||
TI_PDK_LIMIT_BOARDS = "evmAM571x evmAM572x idkAM571x idkAM572x idkAM574x"
|
||||
@@ -1,19 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM57xx HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM57xx HS EVM
|
||||
|
||||
require conf/machine/am57xx-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "am57xx_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_AUTO}/am5x"
|
||||
|
||||
OPTEEMACHINE = "ti"
|
||||
OPTEEFLAVOR = "am57xx"
|
||||
OPTEEOUTPUTMACHINE = "ti"
|
||||
OPTEEPAGER = "y"
|
||||
@@ -1,40 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: BeagleBoard X15
|
||||
#@DESCRIPTION: Machine configuration for the BeagleBoard X15
|
||||
|
||||
require conf/machine/include/dra7xx.inc
|
||||
|
||||
KERNEL_DEVICETREE = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-beagle-x15-revc.dtb"
|
||||
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
UBOOT_MACHINE = "am57xx_evm_config"
|
||||
|
||||
WKS_FILE = "sdimage-bootpart.wks"
|
||||
IMAGE_BOOT_FILES = "MLO u-boot.img"
|
||||
IMAGE_FSTYPES += "tar.xz wic.xz"
|
||||
|
||||
do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
# details about this board please see
|
||||
# http://processors.wiki.ti.com/index.php/UBIFS_Support
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1988 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
# UBI: VID header offset: 2048 (aligned 2048)
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
|
||||
@@ -2,17 +2,28 @@
|
||||
#@NAME: Beagleboard machine
|
||||
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
||||
|
||||
require conf/machine/include/omap3.inc
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
# Only has DVI connector for external screen
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
GUI_MACHINE_CLASS = "bigscreen"
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz ubi"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp"
|
||||
require conf/machine/include/omap3.inc
|
||||
|
||||
KERNEL_DEVICETREE = "omap3-beagle.dtb omap3-beagle-xm.dtb omap3-beagle-xm-ab.dtb"
|
||||
# SPL build
|
||||
EXTRA_IMAGEDEPENDS = "u-boot"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-mainline"
|
||||
|
||||
IMAGE_FSTYPES += "tar.bz2 ubi"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp "
|
||||
|
||||
# Guesswork
|
||||
SERIAL_CONSOLE = "115200 ttyO2"
|
||||
|
||||
UBOOT_MACHINE = "omap3_beagle_config"
|
||||
|
||||
@@ -33,6 +44,8 @@ MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
# and sdio
|
||||
MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa"
|
||||
|
||||
# For a modularized kernel we want to drag in networking, sound, rtc etc."
|
||||
MACHINE_EXTRA_RRECOMMENDS = "kernel-module-smsc95xx kernel-module-snd-soc-twl4030 kernel-module-rtc-twl \
|
||||
kernel-module-snd-soc-omap kernel-module-snd-soc-omap-mcbsp kernel-module-snd-soc-omap3beagle"
|
||||
MACHINE_EXTRA_RRECOMMENDS = "kernel-module-smsc95xx kernel-module-snd-soc-twl4030 kernel-module-rtc-twl"
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
#@NAME: BeagleBone machine
|
||||
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/bone board
|
||||
|
||||
require conf/machine/include/ti33x.inc
|
||||
require conf/machine/include/beaglebone.inc
|
||||
|
||||
KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblue.dtb \
|
||||
am335x-boneblack.dtb am335x-boneblack-wireless.dtb \
|
||||
am335x-bonegreen.dtb am335x-bonegreen-wireless.dtb"
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-video-fbdev"
|
||||
|
||||
# Only has DVI connector for external screen
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
GUI_MACHINE_CLASS = "bigscreen"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
require conf/machine/include/ti33x.inc
|
||||
EXTRA_IMAGEDEPENDS = "u-boot"
|
||||
|
||||
UBOOT_MACHINE = "am335x_boneblack_config"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp"
|
||||
|
||||
WKS_FILE = "sdimage-bootpart.wks"
|
||||
IMAGE_BOOT_FILES = "MLO u-boot.img"
|
||||
IMAGE_FSTYPES += "tar.xz wic.xz"
|
||||
IMAGE_FSTYPES += "tar.bz2 "
|
||||
|
||||
do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
|
||||
# Guesswork
|
||||
SERIAL_CONSOLE = "115200 ttyO0"
|
||||
|
||||
# Refine the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_BOARDS = "bbbAM335x"
|
||||
UBOOT_MACHINE = "am335x_evm_config"
|
||||
|
||||
# and sdio
|
||||
MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 1 c665x machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 1 c665x EVM
|
||||
|
||||
require conf/machine/include/c66x.inc
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "c6657"
|
||||
TI_PDK_LIMIT_BOARDS = "evmC6657"
|
||||
@@ -1,9 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 1 c667x machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 1 c667x EVM
|
||||
|
||||
require conf/machine/include/c66x.inc
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "c6678"
|
||||
TI_PDK_LIMIT_BOARDS = "evmC6678"
|
||||
@@ -1,44 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: DRA7xx EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI DRA7xx EVM
|
||||
|
||||
require conf/machine/include/dra7xx.inc
|
||||
|
||||
MACHINE_FEATURES += "touchscreen"
|
||||
|
||||
IMAGE_FSTYPES += "tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
KERNEL_DEVICETREE = "dra7-evm.dtb dra7-evm-lcd-osd101t2045.dtb dra7-evm-lcd-osd101t2587.dtb \
|
||||
dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb dra72-evm-lcd-osd101t2587.dtb \
|
||||
dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb \
|
||||
dra71-evm.dtb dra71-evm-nand.dtb dra71-evm-lcd-auo-g101evn01.0.dtb dra71-lcard.dtb \
|
||||
dra76-evm.dtb dra76-evm-tfp410.dtb"
|
||||
|
||||
UBOOT_MACHINE = "dra7xx_evm_config"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
# details about this board please see
|
||||
# http://processors.wiki.ti.com/index.php/UBIFS_Support
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1988 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
# UBI: VID header offset: 2048 (aligned 2048)
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_BOARDS = "evmDRA72x evmDRA75x evmDRA78x"
|
||||
TI_PDK_LIMIT_SOCS = "dra72x dra75x dra78x"
|
||||
@@ -1,19 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: DRA7xx HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI DRA7xx HS EVM
|
||||
|
||||
require conf/machine/dra7xx-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "dra7xx_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_AUTO}/dra7"
|
||||
|
||||
OPTEEMACHINE = "ti"
|
||||
OPTEEFLAVOR = "dra7xx"
|
||||
OPTEEOUTPUTMACHINE = "ti"
|
||||
OPTEEPAGER = "y"
|
||||
@@ -1,12 +0,0 @@
|
||||
python () {
|
||||
layers = d.getVar("BBFILE_COLLECTIONS", True)
|
||||
if not layers:
|
||||
return
|
||||
if "yoctobsp" in layers:
|
||||
bb.fatal("\nmeta-yocto-bsp has been detected in bblayers.conf, which provides basic reference BSP for beaglebone platform. " \
|
||||
"\nSince meta-ti provides official comprehensive BSP for TI SoCs, including beaglebone, there could be potential conflicts " \
|
||||
"\nbetween beaglebone machine definitions available in meta-yocto-bsp and meta-ti layers. It is recommended to remove " \
|
||||
"\nor disable meta-yocto-bsp in bblayers.conf, when using meta-ti and building for beaglebone platform. Alternatively, " \
|
||||
"\nit is possible to build for am335x-evm with meta-ti, which is a more generic platform for Sitara AM335x SoC and " \
|
||||
"\nalso covers beaglebone variants.")
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
require conf/machine/include/keystone.inc
|
||||
SOC_FAMILY_append = ":c66x"
|
||||
|
||||
# HACK: The c66x family is composed of devices with only DSP cores, and no ARM
|
||||
# cores. The Linux kernel is not supported on these machines.
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
|
||||
EXTRA_IMAGEDEPENDS = ""
|
||||
|
||||
IMAGE_FSTYPES = "tar.xz"
|
||||
@@ -1,4 +0,0 @@
|
||||
require conf/machine/include/omap-a15.inc
|
||||
SOC_FAMILY_append = ":dra7xx"
|
||||
|
||||
MACHINE_FEATURES += "pci"
|
||||
@@ -1,6 +0,0 @@
|
||||
require conf/machine/include/keystone.inc
|
||||
SOC_FAMILY_append = ":k2e"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "k2e"
|
||||
TI_PDK_LIMIT_BOARDS = "evmK2E"
|
||||
@@ -1,6 +0,0 @@
|
||||
require conf/machine/include/keystone.inc
|
||||
SOC_FAMILY_append = ":k2g"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "k2g"
|
||||
TI_PDK_LIMIT_BOARDS = "evmK2G iceK2G"
|
||||
@@ -1,6 +0,0 @@
|
||||
require conf/machine/include/keystone.inc
|
||||
SOC_FAMILY_append = ":k2hk"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "k2h k2k"
|
||||
TI_PDK_LIMIT_BOARDS = "evmK2H evmK2K"
|
||||
@@ -1,27 +0,0 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":keystone"
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa15.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r10"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# Use the expected value of the ubifs filesystem's volume name in the kernel
|
||||
# and u-boot.
|
||||
UBI_VOLNAME = "rootfs"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
EXTRA_IMAGEDEPENDS += "boot-monitor"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat pci dsp"
|
||||
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
|
||||
@@ -1,36 +0,0 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":omap-a15"
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa15.inc
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r7"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
KERNEL_IMAGETYPES = "zImage uImage"
|
||||
KERNEL_CLASSES += "kernel-uimage"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "virtual/bootloader"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-video-fbdev"
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
|
||||
# Use the expected value of the ubifs filesystem's volume name in the kernel
|
||||
# and u-boot.
|
||||
UBI_VOLNAME = "rootfs"
|
||||
|
||||
# List common SoC features, may need to add touchscreen for specific machines
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet sgx mmip dsp"
|
||||
@@ -1,42 +1,15 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":omap3"
|
||||
SOC_FAMILY = "omap3"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa8.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
|
||||
# For built-in LCD, add xf86-input-tslib
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
# Default to external video, change to smallscreen for built-in LCD
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap"
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r127"
|
||||
MACHINE_KERNEL_PR = "r121"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
# Default providers, may need to override for specific machines
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
|
||||
KERNEL_DEVICETREE = "omap3-beagle.dtb omap3-beagle-xm.dtb omap3-beagle-xm-ab.dtb omap3-evm.dtb omap3-evm-37xx.dtb am3517-evm.dtb"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "omap3_evm_config"
|
||||
XLOAD_MACHINE = "omap3evm_config"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# If SPL is not used, may need to add x-load
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
EXTRA_IMAGEDEPENDS += "u-boot x-load"
|
||||
|
||||
# List common SoC features, may need to add touchscreen/ethernet for specific machines
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa sgx"
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":omap4"
|
||||
SOC_FAMILY = "omap4"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa9.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap4"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xserver-xorg-module-exa \
|
||||
xserver-xorg-extension-dri \
|
||||
xserver-xorg-extension-dri2 \
|
||||
xserver-xorg-extension-glx \
|
||||
xf86-input-evdev \
|
||||
xf86-video-omap"
|
||||
xf86-video-fbdev"
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r4"
|
||||
MACHINE_KERNEL_PR = "r1"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
UBOOT_MACHINE = "omap4_panda_config"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":omapl1"
|
||||
@@ -1,5 +0,0 @@
|
||||
require conf/machine/include/omapl1.inc
|
||||
SOC_FAMILY_append = ":omapl137"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "omapl137"
|
||||
@@ -1,5 +1,2 @@
|
||||
require conf/machine/include/omapl1.inc
|
||||
SOC_FAMILY_append = ":omapl138"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "omapl138"
|
||||
SOC_FAMILY = "omapl138"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# This is a generic TI SOC family. It is a superset of all other SOCs
|
||||
# and platforms defined in meta-ti to allow BSP-level overrides.
|
||||
SOC_FAMILY = "ti-soc"
|
||||
require conf/machine/include/soc-family.inc
|
||||
@@ -1,54 +1,14 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":ti33x"
|
||||
SOC_FAMILY = "ti33x"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa8.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
|
||||
# For built-in LCD, add xf86-input-tslib
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-video-fbdev \
|
||||
xf86-input-keyboard"
|
||||
|
||||
# Default to external video, change to smallscreen for built-in LCD
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti33x-psp"
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r22"
|
||||
MACHINE_KERNEL_PR = "r12"
|
||||
|
||||
# Default providers, may need to override for specific machines
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
KERNEL_DEVICETREE = "am335x-evm.dtb am335x-evmsk.dtb \
|
||||
am335x-icev2.dtb am335x-icev2-prueth.dtb \
|
||||
am335x-bone.dtb am335x-boneblue.dtb \
|
||||
am335x-boneblack.dtb am335x-boneblack-wireless.dtb \
|
||||
am335x-bonegreen.dtb am335x-bonegreen-wireless.dtb"
|
||||
|
||||
KERNEL_DEVICETREE += "${@base_conditional('ENABLE_TI_UIO_DEVICES', '1', 'am335x-icev2-pru-excl-uio.dtb', '', d)}"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "am335x_evm_config"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# Use the expected value of the ubifs filesystem's volume name in the kernel
|
||||
# and u-boot.
|
||||
UBI_VOLNAME = "rootfs"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
# List common SoC features, may need to add touchscreen for specific machines
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet sgx"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "am335x"
|
||||
TI_PDK_LIMIT_BOARDS = "evmAM335x icev2AM335x iceAMIC110 bbbAM335x skAM335x"
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
require conf/machine/include/ti-soc.inc
|
||||
SOC_FAMILY_append = ":ti43x"
|
||||
|
||||
DEFAULTTUNE ?= "armv7athf-neon"
|
||||
require conf/machine/include/tune-cortexa9.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
|
||||
# For built-in LCD, add xf86-input-tslib
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-video-fbdev \
|
||||
xf86-input-keyboard"
|
||||
|
||||
# Default to external video, change to smallscreen for built-in LCD
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r3"
|
||||
|
||||
# Default providers, may need to override for specific machines
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
KERNEL_DEVICETREE = "am437x-gp-evm.dtb am437x-gp-evm-hdmi.dtb \
|
||||
am437x-sk-evm.dtb am437x-idk-evm.dtb \
|
||||
am43x-epos-evm.dtb am43x-epos-evm-hdmi.dtb"
|
||||
|
||||
KERNEL_DEVICETREE += "${@base_conditional('ENABLE_TI_UIO_DEVICES', '1', 'am437x-idk-pru-excl-uio.dtb', '', d)}"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "am43xx_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# Use the expected value of the ubifs filesystem's volume name in the kernel
|
||||
# and u-boot.
|
||||
UBI_VOLNAME = "rootfs"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
# List common SoC features, may need to add touchscreen for specific machines
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet sgx"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "am437x"
|
||||
TI_PDK_LIMIT_BOARDS = "evmAM437x idkAM437x skAM437x"
|
||||
@@ -1,32 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2E machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2E EVM
|
||||
|
||||
require conf/machine/include/k2e.inc
|
||||
|
||||
KERNEL_DEVICETREE = "keystone-k2e-evm.dtb"
|
||||
|
||||
UBOOT_MACHINE = "k2e_evm_config"
|
||||
|
||||
BOOT_MONITOR_MAKE_TARGET = "k2e"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
SYSVINIT_ENABLED_GETTYS = ""
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 3856 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 4000"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 2048
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048 -O 2048"
|
||||
@@ -1,14 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2E HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2E HS EVM
|
||||
|
||||
require conf/machine/k2e-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "k2e_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/k2e"
|
||||
@@ -1,35 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2G machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2G EVM
|
||||
|
||||
require conf/machine/include/k2g.inc
|
||||
|
||||
MACHINE_FEATURES += "alsa"
|
||||
|
||||
KERNEL_DEVICETREE = "keystone-k2g-evm.dtb keystone-k2g-evm-lcd.dtb keystone-k2g-ice.dtb \
|
||||
${@base_conditional('ENABLE_TI_UIO_DEVICES', '1', 'keystone-k2g-ice-pru-excl-uio.dtb', '', d)}"
|
||||
|
||||
UBOOT_MACHINE = "k2g_evm_config"
|
||||
|
||||
BOOT_MONITOR_MAKE_TARGET = "k2g"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
SYSVINIT_ENABLED_GETTYS = ""
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: logical eraseblock size: 253952 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1926 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 2000"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: physical eraseblock size: 256 KiB
|
||||
# UBI: sub-page size: 4096
|
||||
UBINIZE_ARGS = "-m 4096 -p 256KiB -s 4096 -O 4096"
|
||||
@@ -1,14 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2G HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2G HS EVM
|
||||
|
||||
require conf/machine/k2g-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "k2g_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/k2g"
|
||||
@@ -1,32 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2HK machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2HK EVM
|
||||
|
||||
require conf/machine/include/k2hk.inc
|
||||
|
||||
KERNEL_DEVICETREE = "keystone-k2hk-evm.dtb"
|
||||
|
||||
UBOOT_MACHINE = "k2hk_evm_config"
|
||||
|
||||
BOOT_MONITOR_MAKE_TARGET = "k2hk"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
SYSVINIT_ENABLED_GETTYS = ""
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 3856 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 4000"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 2048
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048 -O 2048"
|
||||
@@ -1,14 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2HK HS EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2HK HS EVM
|
||||
|
||||
require conf/machine/k2hk-evm.conf
|
||||
|
||||
UBOOT_MACHINE = "k2hk_hs_evm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x84000000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x84000000"
|
||||
|
||||
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/k2hk"
|
||||
@@ -1,36 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Keystone 2 K2L machine
|
||||
#@DESCRIPTION: Machine configuration for the TI Keystone 2 K2L EVM
|
||||
|
||||
require conf/machine/include/keystone.inc
|
||||
|
||||
KERNEL_DEVICETREE = "keystone-k2l-evm.dtb"
|
||||
|
||||
UBOOT_MACHINE = "k2l_evm_config"
|
||||
|
||||
BOOT_MONITOR_MAKE_TARGET = "k2l"
|
||||
|
||||
IMAGE_FSTYPES += "ubifs ubi tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
SYSVINIT_ENABLED_GETTYS = ""
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: logical eraseblock size: 253952 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1926 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 2000"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 4096
|
||||
# UBI: physical eraseblock size: 256 KiB
|
||||
# UBI: sub-page size: 4096
|
||||
UBINIZE_ARGS = "-m 4096 -p 256KiB -s 4096 -O 4096"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_SOCS = "k2l"
|
||||
TI_PDK_LIMIT_BOARDS = "evmK2L"
|
||||
@@ -1,21 +1,40 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: OMAP3 EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI OMAP3 EVM
|
||||
TARGET_ARCH = "arm"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-tslib \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
GUI_MACHINE_CLASS = "smallscreen"
|
||||
|
||||
require conf/machine/include/omap3.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
MACHINE_FEATURES += "touchscreen ethernet"
|
||||
# Ship all kernel modules
|
||||
|
||||
IMAGE_FSTYPES += "jffs2 tar.gz"
|
||||
IMAGE_FSTYPES += "jffs2 tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
USE_VT = "0"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "x-load"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap-psp"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "omap3_evm_config"
|
||||
XLOAD_MACHINE = "omap3evm_config"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen touchscreen"
|
||||
|
||||
# NOTE: there are NAND and OneNAND versions of this board...
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
@@ -30,3 +49,4 @@ MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: OMAP5 EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI OMAP5 uEVM
|
||||
|
||||
require conf/machine/include/omap-a15.inc
|
||||
|
||||
IMAGE_FSTYPES += "ubi tar.gz"
|
||||
|
||||
KERNEL_DEVICETREE = "omap5-uevm.dtb"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
# UBI information. Note that this is board and kernel specific. Changes
|
||||
# in your kernel port may require changes in these variables. For more
|
||||
# details about this board please see
|
||||
# http://processors.wiki.ti.com/index.php/UBIFS_Support
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1988 LEBs
|
||||
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 4300"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
# UBI: VID header offset: 2048 (aligned 2048)
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
|
||||
|
||||
UBOOT_MACHINE = "omap5_uevm_config"
|
||||
@@ -1,15 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: OMAP-L137 EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI OMAP-L137 EVM board
|
||||
|
||||
require conf/machine/include/davinci.inc
|
||||
require conf/machine/include/omapl137.inc
|
||||
|
||||
# HACK: The omapl137 family does not have linux kernel support.
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
|
||||
EXTRA_IMAGEDEPENDS = ""
|
||||
|
||||
IMAGE_FSTYPES = "tar.xz"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_BOARDS = "evmOMAPL137"
|
||||
@@ -1,21 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: OMAP-L138 LCDK
|
||||
#@DESCRIPTION: Machine configuration for the TI OMAP-L138 LCDK board
|
||||
|
||||
require conf/machine/include/davinci.inc
|
||||
require conf/machine/include/omapl138.inc
|
||||
|
||||
UBOOT_MACHINE = "omapl138_lcdk_config"
|
||||
UBOOT_SUFFIX = "ais"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0xc0008000"
|
||||
UBOOT_LOADADDRESS = "0xc0008000"
|
||||
|
||||
IMAGE_FSTYPES += "tar.xz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
KERNEL_DEVICETREE = "da850-evm.dtb da850-lcdk.dtb"
|
||||
|
||||
# Set the list of device targets for ti-pdk class recipes
|
||||
TI_PDK_LIMIT_BOARDS = "lcdkOMAPL138"
|
||||
@@ -4,13 +4,15 @@
|
||||
|
||||
require conf/machine/include/omap4.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "bigscreen"
|
||||
UBOOT_MACHINE = "omap4_panda_config"
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz"
|
||||
GUI_MACHINE_CLASS = "bigscreen"
|
||||
|
||||
KERNEL_DEVICETREE = "omap4-panda.dtb omap4-panda-a4.dtb omap4-panda-es.dtb"
|
||||
IMAGE_FSTYPES += "tar.bz2"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
SERIAL_CONSOLE = "115200 ttyO2"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
|
||||
MACHINE_FEATURES = "kernel26 wifi bluetooth alsa apm ext2 screen usbgadget usbhost vfat sgx"
|
||||
MACHINE_FEATURES = "kernel26 wifi bluetooth alsa apm ext2 screen touchscreen usbgadget usbhost vfat"
|
||||
|
||||
|
||||
|
||||
17
extras/COPYING.MIT
Normal file
17
extras/COPYING.MIT
Normal file
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
17
extras/README
Normal file
17
extras/README
Normal file
@@ -0,0 +1,17 @@
|
||||
An "extras" (AKA best-effort) layer for meta-ti
|
||||
|
||||
This layer depends on:
|
||||
|
||||
URI: git://git.openembedded.org/openembedded-core
|
||||
layers: meta
|
||||
branch: master
|
||||
|
||||
URI: git://git.yoctoproject.org/meta-ti
|
||||
layers: meta
|
||||
branch: master
|
||||
|
||||
|
||||
Send pull requests, patches, comments or questions to meta-ti@yoctoproject.org
|
||||
|
||||
Maintainers: Denys Dmytriyenko <denys@ti.com>
|
||||
Koen Kooi <koen@dominion.thruhere.net>
|
||||
9
extras/conf/layer.conf
Normal file
9
extras/conf/layer.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
# We have a conf and classes directory, append to BBPATH
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have a recipes directory, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-ti-extras"
|
||||
BBFILE_PATTERN_meta-ti := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-ti = "10"
|
||||
@@ -2,23 +2,38 @@
|
||||
#@NAME: AM3517 EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI Sitara AM3517 EVM
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-tslib \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
GUI_MACHINE_CLASS = "smallscreen"
|
||||
|
||||
require conf/machine/include/omap3.inc
|
||||
|
||||
MACHINE_GUI_CLASS = "smallscreen"
|
||||
MACHINE_FEATURES += "touchscreen ethernet"
|
||||
# Ship all kernel modules
|
||||
|
||||
IMAGE_FSTYPES += "ubi tar.gz"
|
||||
IMAGE_FSTYPES += "ubi tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
USE_VT = "2"
|
||||
|
||||
KERNEL_DEVICETREE = "am3517-evm.dtb"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap-psp"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "am3517_evm_config"
|
||||
XLOAD_MACHINE = "am3517evm_config"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen touchscreen ethernet"
|
||||
|
||||
# NOTE: there are NAND and OneNAND versions of this board...
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
@@ -33,3 +48,4 @@ MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
5
extras/conf/machine/am387x-evm.conf
Normal file
5
extras/conf/machine/am387x-evm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: AM389x evm
|
||||
#@DESCRIPTION: Machine configuration for the AM389x evm
|
||||
|
||||
require conf/machine/include/ti814x.inc
|
||||
5
extras/conf/machine/am389x-evm.conf
Normal file
5
extras/conf/machine/am389x-evm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: am389x evm
|
||||
#@DESCRIPTION: Machine configuration for the am389x evm
|
||||
|
||||
require conf/machine/include/ti816x.inc
|
||||
5
extras/conf/machine/c6a814x-evm.conf
Normal file
5
extras/conf/machine/c6a814x-evm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: c6a814x evm
|
||||
#@DESCRIPTION: Machine configuration for the c6a814x evm
|
||||
|
||||
require conf/machine/include/ti814x.inc
|
||||
5
extras/conf/machine/c6a816x-evm.conf
Normal file
5
extras/conf/machine/c6a816x-evm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: c6a816x evm
|
||||
#@DESCRIPTION: Machine configuration for the c6a816x evm
|
||||
|
||||
require conf/machine/include/ti816x.inc
|
||||
5
extras/conf/machine/dm814x-evm.conf
Normal file
5
extras/conf/machine/dm814x-evm.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: DM814x evm
|
||||
#@DESCRIPTION: Machine configuration for the DM814x evm
|
||||
|
||||
require conf/machine/include/ti814x.inc
|
||||
29
extras/conf/machine/hawkboard.conf
Normal file
29
extras/conf/machine/hawkboard.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: OMAP-L138 based board
|
||||
#@DESCRIPTION: Machine configuration for the TI Hawkboard
|
||||
|
||||
require conf/machine/include/davinci.inc
|
||||
require conf/machine/include/omapl138.inc
|
||||
|
||||
UBOOT_MACHINE = "da850_omapl138_evm_config"
|
||||
UBOOT_ENTRYPOINT = "0xc0008000"
|
||||
UBOOT_LOADADDRESS = "0xc0008000"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 serial ethernet ide screen"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 126976 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 971 LEBs (123293696 bytes, 117.6 MiB), available 958 LEBs (121643008 bytes, 116.0 MiB), LEB size 126976 bytes (124.0 KiB)
|
||||
MKUBIFS_ARGS = "-m 2048 -e 126976 -c 948"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
@@ -1,14 +1,14 @@
|
||||
require conf/machine/include/tune-arm926ejs.inc
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r54"
|
||||
MACHINE_KERNEL_PR = "r51"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-davinci"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
UBOOT_MACHINE = "davinci_dvevm_config"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
@@ -19,4 +19,6 @@ EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
|
||||
|
||||
#ROOT_FLASH_SIZE = "29"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 serial ethernet usbhost usbgadget mmc alsa"
|
||||
26
extras/conf/machine/include/ti814x.inc
Normal file
26
extras/conf/machine/include/ti814x.inc
Normal file
@@ -0,0 +1,26 @@
|
||||
SOC_FAMILY = "ti814x"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
require conf/machine/include/tune-cortexa8.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti81xx-psp"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r2"
|
||||
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "ti8148_evm_config_nand"
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# Only build u-boot
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
# Ship all kernel modules
|
||||
IMAGE_FSTYPES += "jffs2 tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lqn -e 128"
|
||||
SERIAL_CONSOLE = "115200 ttyO0"
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 ethernet"
|
||||
26
extras/conf/machine/include/ti816x.inc
Normal file
26
extras/conf/machine/include/ti816x.inc
Normal file
@@ -0,0 +1,26 @@
|
||||
SOC_FAMILY = "ti816x"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
require conf/machine/include/tune-cortexa8.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-ti81xx-psp"
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
|
||||
# Increase this everytime you change something in the kernel
|
||||
MACHINE_KERNEL_PR = "r2"
|
||||
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "ti8168_evm_config"
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# Only build u-boot
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
# Ship all kernel modules
|
||||
IMAGE_FSTYPES += "jffs2 tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lqn -e 128"
|
||||
SERIAL_CONSOLE = "115200 ttyO2"
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 ethernet"
|
||||
49
extras/conf/machine/omap3-touchbook.conf
Normal file
49
extras/conf/machine/omap3-touchbook.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: Always Innovating touchbook
|
||||
#@DESCRIPTION: Machine configuration for the http://www.alwaysinnovating.com/touchbook/
|
||||
TARGET_ARCH = "arm"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
XSERVER = "xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-tslib \
|
||||
xf86-video-fbdev \
|
||||
xf86-video-omapfb \
|
||||
xf86-input-keyboard"
|
||||
|
||||
# Only has DVI connector for external screen
|
||||
GUI_MACHINE_CLASS = "bigscreen"
|
||||
|
||||
require conf/machine/include/omap3.inc
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-omap-psp"
|
||||
|
||||
IMAGE_FSTYPES += "tar.bz2"
|
||||
EXTRA_IMAGECMD_jffs2 = "-lnp "
|
||||
|
||||
# Guesswork
|
||||
SERIAL_CONSOLE = "115200 ttyS2"
|
||||
|
||||
UBOOT_MACHINE = "omap3_beagle_config"
|
||||
XLOAD_MACHINE = "beagleboard_config"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# From dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: logical eraseblock size: 129024 bytes
|
||||
# from ubiattach stdout:
|
||||
# UBI device number 0, total 1996 LEBs
|
||||
MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"
|
||||
|
||||
# do ubiattach /dev/ubi_ctrl -m 4
|
||||
# from dmesg:
|
||||
# UBI: smallest flash I/O unit: 2048
|
||||
# UBI: physical eraseblock size: 131072 bytes (128 KiB)
|
||||
# UBI: sub-page size: 512
|
||||
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
|
||||
|
||||
|
||||
|
||||
# and sdio
|
||||
MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa touchscreen"
|
||||
@@ -0,0 +1,51 @@
|
||||
From 1415ec63689ef39bcb24b5095941ec4cc884035c Mon Sep 17 00:00:00 2001
|
||||
From: Mikael Pettersson <mikpe@it.uu.se>
|
||||
Date: Sun, 15 Aug 2010 10:47:23 +0100
|
||||
Subject: [PATCH 1/2] ARM: 6329/1: wire up sys_accept4() on ARM
|
||||
|
||||
sys_accept4() was added in kernel 2.6.28, but ARM was not updated
|
||||
to include it. The number and types of parameters is such that
|
||||
no ARM-specific processing is needed, so wiring up sys_accept4()
|
||||
just requires defining __NR_accept4 and adding a direct call in
|
||||
the syscall entry table.
|
||||
|
||||
Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
|
||||
accept4() test program, modified to define __NR_accept4 for ARM.
|
||||
|
||||
Using the updated unistd.h also eliminates a warning then building
|
||||
glibc (2.10.2 and newer) about accept4() being unimplemented.
|
||||
|
||||
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
---
|
||||
arch/arm/include/asm/unistd.h | 1 +
|
||||
arch/arm/kernel/calls.S | 1 +
|
||||
2 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
|
||||
index dd2bf53..d02cfb6 100644
|
||||
--- a/arch/arm/include/asm/unistd.h
|
||||
+++ b/arch/arm/include/asm/unistd.h
|
||||
@@ -392,6 +392,7 @@
|
||||
#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
|
||||
#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
|
||||
#define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
|
||||
+#define __NR_accept4 (__NR_SYSCALL_BASE+366)
|
||||
|
||||
/*
|
||||
* The following SWIs are ARM private.
|
||||
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
|
||||
index 37ae301..afeb71f 100644
|
||||
--- a/arch/arm/kernel/calls.S
|
||||
+++ b/arch/arm/kernel/calls.S
|
||||
@@ -375,6 +375,7 @@
|
||||
CALL(sys_rt_tgsigqueueinfo)
|
||||
CALL(sys_perf_event_open)
|
||||
/* 365 */ CALL(sys_recvmmsg)
|
||||
+ CALL(sys_accept4)
|
||||
#ifndef syscalls_counted
|
||||
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
|
||||
#define syscalls_counted
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From b0a773f958b03ba77317f8b762d90d3c00269292 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Monk <r-monk@ti.com>
|
||||
Date: Wed, 25 Aug 2010 16:45:46 +0100
|
||||
Subject: [PATCH] ahci-ti: Fix (currently harmless) typo in SATA PHY configuration
|
||||
|
||||
Signed-off-by: Roger Monk <r-monk@ti.com>
|
||||
---
|
||||
drivers/ata/ahci-ti.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci-ti.c b/drivers/ata/ahci-ti.c
|
||||
index 9e36c9d..674b216 100644
|
||||
--- a/drivers/ata/ahci-ti.c
|
||||
+++ b/drivers/ata/ahci-ti.c
|
||||
@@ -80,7 +80,7 @@ void ata_plat_init (void __iomem *base)
|
||||
phy_val = PHY_MPY << 0 | PHY_LB << 4 | PHY_LOS << 6 |
|
||||
PHY_RXINVPAIR << 7 | PHY_RXTERM << 8 |
|
||||
PHY_RXCDR << 10 | PHY_RXEQ << 13 |
|
||||
- PHY_RXINVPAIR << 17 | PHY_TXCM << 18 |
|
||||
+ PHY_TXINVPAIR << 17 | PHY_TXCM << 18 |
|
||||
PHY_TXSWING << 19 | PHY_TXDE << 22 |
|
||||
PHY_OVERRIDE << 30 | PHY_ENPLL << 31;
|
||||
|
||||
--
|
||||
1.6.0.4
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From 787c524fc478068d18eef72f43074b47722e50b0 Mon Sep 17 00:00:00 2001
|
||||
From: Greg KH <gregkh@suse.de>
|
||||
Date: Thu, 5 Aug 2010 13:53:35 -0700
|
||||
Subject: [PATCH] cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
|
||||
|
||||
We really shouldn't be asking userspace to create new root filesystems.
|
||||
So follow along with all of the other in-kernel filesystems, and provide
|
||||
a mount point in sysfs.
|
||||
|
||||
For cgroupfs, this should be in /sys/fs/cgroup/ This change provides
|
||||
that mount point when the cgroup filesystem is registered in the kernel.
|
||||
|
||||
Acked-by: Paul Menage <menage@google.com>
|
||||
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
|
||||
Cc: Li Zefan <lizf@cn.fujitsu.com>
|
||||
Cc: Lennart Poettering <lennart@poettering.net>
|
||||
Cc: Kay Sievers <kay.sievers@vrfy.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
kernel/cgroup.c | 13 ++++++++++++-
|
||||
1 files changed, 12 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
|
||||
index 0249f4b..db21dd8 100644
|
||||
--- a/kernel/cgroup.c
|
||||
+++ b/kernel/cgroup.c
|
||||
@@ -1472,6 +1472,8 @@ static struct file_system_type cgroup_fs_type = {
|
||||
.kill_sb = cgroup_kill_sb,
|
||||
};
|
||||
|
||||
+static struct kobject *cgroup_kobj;
|
||||
+
|
||||
static inline struct cgroup *__d_cgrp(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_fsdata;
|
||||
@@ -3283,9 +3285,18 @@ int __init cgroup_init(void)
|
||||
hhead = css_set_hash(init_css_set.subsys);
|
||||
hlist_add_head(&init_css_set.hlist, hhead);
|
||||
BUG_ON(!init_root_id(&rootnode));
|
||||
+
|
||||
+ cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj);
|
||||
+ if (!cgroup_kobj) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
err = register_filesystem(&cgroup_fs_type);
|
||||
- if (err < 0)
|
||||
+ if (err < 0) {
|
||||
+ kobject_put(cgroup_kobj);
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations);
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 37a7868b15be9415abd3f57477afc8be956666e6 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Monk <r-monk@ti.com>
|
||||
Date: Wed, 25 Aug 2010 16:46:28 +0100
|
||||
Subject: [PATCH] ahci-ti: Update SATA PHY configuration - RXCDR --> 4
|
||||
|
||||
* Update SATA PHY configuration for Receiver Clock/Data Recovery
|
||||
* Set to 0x4 = 2nd order, low precision
|
||||
|
||||
Signed-off-by: Roger Monk <r-monk@ti.com>
|
||||
---
|
||||
drivers/ata/ahci-ti.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci-ti.c b/drivers/ata/ahci-ti.c
|
||||
index 674b216..853d251 100644
|
||||
--- a/drivers/ata/ahci-ti.c
|
||||
+++ b/drivers/ata/ahci-ti.c
|
||||
@@ -55,7 +55,7 @@ void ata_plat_remove(struct ata_host *host);
|
||||
#define PHY_LOS 1 /* bit6 1 */
|
||||
#define PHY_RXINVPAIR 0 /* bit7 1 */
|
||||
#define PHY_RXTERM 0 /* bits9:8 2 */
|
||||
-#define PHY_RXCDR 0 /* bits12:10 3 */
|
||||
+#define PHY_RXCDR 4 /* bits12:10 3 */
|
||||
#define PHY_RXEQ 1 /* bits16:13 4 */
|
||||
#define PHY_TXINVPAIR 0 /* bit17 1 */
|
||||
#define PHY_TXCM 0 /* bit18 1 */
|
||||
--
|
||||
1.6.0.4
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 69600e5a42512204bc4eb83a3a459496b049107f Mon Sep 17 00:00:00 2001
|
||||
From: Roger Monk <r-monk@ti.com>
|
||||
Date: Wed, 25 Aug 2010 17:47:16 +0100
|
||||
Subject: [PATCH] board-da850-hawk: Disable NAND SUBPAGE
|
||||
|
||||
* This was causing issues with UBI
|
||||
* Solution/Workaround identified by Caglar Akyuz - now applied locally to board file
|
||||
---
|
||||
arch/arm/mach-davinci/board-da850-hawk.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/board-da850-hawk.c b/arch/arm/mach-davinci/board-da850-hawk.c
|
||||
index 87ed017..bbfe32a 100644
|
||||
--- a/arch/arm/mach-davinci/board-da850-hawk.c
|
||||
+++ b/arch/arm/mach-davinci/board-da850-hawk.c
|
||||
@@ -118,7 +118,7 @@ static struct davinci_nand_pdata da850_hawk_nandflash_data = {
|
||||
.nr_parts = ARRAY_SIZE(da850_hawk_nandflash_partition),
|
||||
.ecc_mode = NAND_ECC_HW,
|
||||
.ecc_bits = 4,
|
||||
- .options = NAND_USE_FLASH_BBT,
|
||||
+ .options = NAND_USE_FLASH_BBT | NAND_NO_SUBPAGE_WRITE,
|
||||
.timing = &da850_hawk_nandflash_timing,
|
||||
};
|
||||
|
||||
--
|
||||
1.6.0.4
|
||||
|
||||
2630
extras/recipes-kernel/linux/linux-davinci/hawkboard/configs/stock
Normal file
2630
extras/recipes-kernel/linux/linux-davinci/hawkboard/configs/stock
Normal file
File diff suppressed because it is too large
Load Diff
2659
extras/recipes-kernel/linux/linux-davinci/hawkboard/defconfig
Normal file
2659
extras/recipes-kernel/linux/linux-davinci/hawkboard/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
From 2ee9f2c655710d9e60a5a9b49871edc316e5363d Mon Sep 17 00:00:00 2001
|
||||
From: Roger Monk <r-monk@ti.com>
|
||||
Date: Wed, 25 Aug 2010 17:29:14 +0100
|
||||
Subject: [PATCH] board-da850-evm: Disable NAND SUBPAGE
|
||||
|
||||
* This was causing issues with UBI
|
||||
* Solution/Workaround identified by Caglar Akyuz - now applied locally to board file
|
||||
|
||||
Signed-off-by: Roger Monk <r-monk@ti.com>
|
||||
---
|
||||
arch/arm/mach-davinci/board-da850-evm.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
|
||||
index cfed439..502b914 100755
|
||||
--- a/arch/arm/mach-davinci/board-da850-evm.c
|
||||
+++ b/arch/arm/mach-davinci/board-da850-evm.c
|
||||
@@ -187,7 +187,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = {
|
||||
.nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
|
||||
.ecc_mode = NAND_ECC_HW,
|
||||
.ecc_bits = 4,
|
||||
- .options = NAND_USE_FLASH_BBT,
|
||||
+ .options = NAND_USE_FLASH_BBT | NAND_NO_SUBPAGE_WRITE,
|
||||
.timing = &da850_evm_nandflash_timing,
|
||||
};
|
||||
|
||||
--
|
||||
1.6.0.4
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
From: Melissa Watkins <m-watkins@ti.com>
|
||||
Date: Wed, 24 Nov 2010 02:59:34 -0600
|
||||
Subject: [PATCH 1/3] uio_pruss1: Core driver addition
|
||||
|
||||
This patch adds the uio_pru driver and updates the uio Makefile
|
||||
and Kconfig files to support this driver. The uio_pru driver provides
|
||||
a framework for handling the PRU in the user space and is responsible
|
||||
for the device setup and the primary interrupt handling.
|
||||
|
||||
Signed-off-by: Amit Chatterjee <amit.chatterjee@ti.com>
|
||||
Signed-off-by: Melissa Watkins <m-watkins@ti.com>
|
||||
---
|
||||
drivers/uio/Kconfig | 10 ++
|
||||
drivers/uio/Makefile | 1 +
|
||||
drivers/uio/uio_pru.c | 279 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 290 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/uio/uio_pru.c
|
||||
|
||||
diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
|
||||
index 8aa1955..8ae8280 100644
|
||||
--- a/drivers/uio/Kconfig
|
||||
+++ b/drivers/uio/Kconfig
|
||||
@@ -94,4 +94,14 @@ config UIO_PCI_GENERIC
|
||||
primarily, for virtualization scenarios.
|
||||
If you compile this as a module, it will be called uio_pci_generic.
|
||||
|
||||
+config UIO_PRUSS
|
||||
+ tristate "Texas Instruments PRUSS driver"
|
||||
+ depends on ARCH_DAVINCI_DA850
|
||||
+ default n
|
||||
+ help
|
||||
+ PRUSS driver for OMAPL13X/DA8XX/AM17XX/AM18XX devices
|
||||
+ PRUSS driver requires user space components
|
||||
+ To compile this driver as a module, choose M here: the module
|
||||
+ will be called uio_pruss.
|
||||
+
|
||||
endif
|
||||
diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile
|
||||
index 73b2e75..e6d8adb 100644
|
||||
--- a/drivers/uio/Makefile
|
||||
+++ b/drivers/uio/Makefile
|
||||
@@ -6,3 +6,4 @@ obj-$(CONFIG_UIO_SMX) += uio_smx.o
|
||||
obj-$(CONFIG_UIO_AEC) += uio_aec.o
|
||||
obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o
|
||||
obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o
|
||||
+obj-$(CONFIG_UIO_PRUSS) += uio_pru.o
|
||||
diff --git a/drivers/uio/uio_pru.c b/drivers/uio/uio_pru.c
|
||||
new file mode 100644
|
||||
index 0000000..82dc35e
|
||||
--- /dev/null
|
||||
+++ b/drivers/uio/uio_pru.c
|
||||
@@ -0,0 +1,279 @@
|
||||
+/*
|
||||
+ * UIO TI Programmable Real-Time Unit (PRU) driver.
|
||||
+ *
|
||||
+ * (C) 2010 Amit Chatterjee <amit.chatterjee@ti.com>
|
||||
+ *
|
||||
+ * Copyright (C) {YEAR} Texas Instruments Incorporated - http://www.ti.com/
|
||||
+ *
|
||||
+ * 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 version 2.
|
||||
+ *
|
||||
+ * This program is distributed .as is. WITHOUT ANY WARRANTY of any
|
||||
+ * kind, whether express or implied; without even the implied warranty
|
||||
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/uio_driver.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+
|
||||
+#define DRV_NAME "pruss"
|
||||
+#define DRV_VERSION "0.01"
|
||||
+
|
||||
+/*
|
||||
+0x01C30000 - 0x01C301FF Data RAM 0
|
||||
+0x01C30200 - 0x01C31FFF Reserved
|
||||
+0x01C32000 - 0x01C321FF Data RAM 1
|
||||
+0x01C32200 - 0x01C33FFF Reserved
|
||||
+0x01C34000 - 0x01C36FFF INTC Registers
|
||||
+0x01C37000 - 0x01C373FF PRU0 Control Registers
|
||||
+0x01C37400 - 0x01C377FF PRU0 Debug Registers
|
||||
+0x01C37800 - 0x01C37BFF PRU1 Control Registers
|
||||
+0x01C37C00 - 0x01C37FFF PRU1 Debug Registers
|
||||
+0x01C38000 - 0x01C38FFF PRU0 Instruction RAM
|
||||
+0x01C39000 - 0x01C3BFFF Reserved
|
||||
+0x01C3C000 - 0x01C3CFFF PRU1 Instruction RAM
|
||||
+0x01C3D000 - 0x01C3FFFF Reserved
|
||||
+*/
|
||||
+/*
|
||||
+ * 3 PRU_EVTOUT0 PRUSS Interrupt
|
||||
+ * 4 PRU_EVTOUT1 PRUSS Interrupt
|
||||
+ * 5 PRU_EVTOUT2 PRUSS Interrupt
|
||||
+ * 6 PRU_EVTOUT3 PRUSS Interrupt
|
||||
+ * 7 PRU_EVTOUT4 PRUSS Interrupt
|
||||
+ * 8 PRU_EVTOUT5 PRUSS Interrupt
|
||||
+ * 9 PRU_EVTOUT6 PRUSS Interrupt
|
||||
+ * 10 PRU_EVTOUT7 PRUSS Interrupt
|
||||
+*/
|
||||
+
|
||||
+#define PRUSS_INSTANCE (8)
|
||||
+
|
||||
+static struct clk *pruss_clk = NULL, *ecap0_clk = NULL;
|
||||
+static struct uio_info *info[PRUSS_INSTANCE];
|
||||
+static void *ddr_virt_addr;
|
||||
+static dma_addr_t ddr_phy_addr;
|
||||
+
|
||||
+
|
||||
+
|
||||
+static irqreturn_t pruss_handler(int irq, struct uio_info *dev_info)
|
||||
+{
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static int __devinit pruss_probe(struct platform_device *dev)
|
||||
+{
|
||||
+ int ret = -ENODEV;
|
||||
+ int count = 0;
|
||||
+ struct resource *regs_pruram, *regs_l3ram, *regs_ddr;
|
||||
+ char *string;
|
||||
+
|
||||
+ /* Power on PRU in case its not done as part of boot-loader */
|
||||
+ pruss_clk = clk_get(&dev->dev, "pruss");
|
||||
+ if (IS_ERR(pruss_clk)) {
|
||||
+ dev_err(&dev->dev, "no pruss clock available\n");
|
||||
+ ret = PTR_ERR(pruss_clk);
|
||||
+ pruss_clk = NULL;
|
||||
+ return ret;
|
||||
+ } else {
|
||||
+ clk_enable (pruss_clk);
|
||||
+ }
|
||||
+
|
||||
+ ecap0_clk = clk_get(&dev->dev, "ecap0");
|
||||
+ if (IS_ERR(ecap0_clk)) {
|
||||
+ dev_err(&dev->dev, "no ecap0 clock available\n");
|
||||
+ ret = PTR_ERR(ecap0_clk);
|
||||
+ ecap0_clk = NULL;
|
||||
+ return ret;
|
||||
+ } else {
|
||||
+ clk_enable(ecap0_clk);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+
|
||||
+ for (count = 0; count < PRUSS_INSTANCE; count++) {
|
||||
+ info[count] = (struct uio_info *)kzalloc(sizeof(struct uio_info), GFP_KERNEL);
|
||||
+ if (!info[count])
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ regs_pruram = platform_get_resource(dev, IORESOURCE_MEM, 0);
|
||||
+ if (!regs_pruram) {
|
||||
+ dev_err(&dev->dev, "No memory resource specified\n");
|
||||
+ goto out_free;
|
||||
+ }
|
||||
+
|
||||
+ regs_l3ram = platform_get_resource(dev, IORESOURCE_MEM, 1);
|
||||
+ if (!regs_l3ram) {
|
||||
+ dev_err(&dev->dev, "No memory resource specified\n");
|
||||
+ goto out_free;
|
||||
+ }
|
||||
+
|
||||
+ regs_ddr = platform_get_resource(dev, IORESOURCE_MEM, 2);
|
||||
+ if (!regs_ddr) {
|
||||
+ dev_err(&dev->dev, "No memory resource specified\n");
|
||||
+ goto out_free;
|
||||
+ }
|
||||
+ ddr_virt_addr = dma_alloc_coherent(&dev->dev, regs_ddr->end-regs_ddr->start+1, &ddr_phy_addr, GFP_KERNEL|GFP_DMA);
|
||||
+
|
||||
+
|
||||
+ for (count = 0; count < PRUSS_INSTANCE; count++) {
|
||||
+ info[count]->mem[0].addr = regs_pruram->start;
|
||||
+ if (!info[count]->mem[0].addr) {
|
||||
+ dev_err(&dev->dev, "Invalid memory resource\n");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ info[count]->mem[0].size = regs_pruram->end - regs_pruram->start + 1;
|
||||
+ info[count]->mem[0].internal_addr = ioremap(regs_pruram->start, info[count]->mem[0].size);
|
||||
+
|
||||
+ if (!info[count]->mem[0].internal_addr) {
|
||||
+ dev_err(&dev->dev, "Can't remap memory address range\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ info[count]->mem[0].memtype = UIO_MEM_PHYS;
|
||||
+
|
||||
+
|
||||
+ info[count]->mem[1].addr = regs_l3ram->start;
|
||||
+ if (!info[count]->mem[1].addr) {
|
||||
+ dev_err(&dev->dev, "Invalid memory resource\n");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ info[count]->mem[1].size = regs_l3ram->end - regs_l3ram->start + 1;
|
||||
+ info[count]->mem[1].internal_addr = ioremap(regs_l3ram->start, info[count]->mem[1].size);
|
||||
+
|
||||
+ if (!info[count]->mem[1].internal_addr) {
|
||||
+ dev_err(&dev->dev, "Can't remap memory address range\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ info[count]->mem[1].memtype = UIO_MEM_PHYS;
|
||||
+
|
||||
+
|
||||
+ info[count]->mem[2].size = regs_ddr->end - regs_ddr->start + 1;
|
||||
+ if (!(info[count]->mem[2].size-1)) {
|
||||
+ dev_err(&dev->dev, "Invalid memory resource\n");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ info[count]->mem[2].internal_addr = ddr_virt_addr;
|
||||
+
|
||||
+ if (!info[count]->mem[2].internal_addr) {
|
||||
+ dev_err(&dev->dev, "Can't remap memory address range\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ info[count]->mem[2].addr = ddr_phy_addr;
|
||||
+ info[count]->mem[2].memtype = UIO_MEM_PHYS;
|
||||
+
|
||||
+
|
||||
+ string = kzalloc(20, GFP_KERNEL);
|
||||
+ sprintf(string, "pruss_evt%d", count);
|
||||
+ info[count]->name = string;
|
||||
+ info[count]->version = "0.01";
|
||||
+
|
||||
+ /* Register PRUSS IRQ lines */
|
||||
+ info[count]->irq = IRQ_DA8XX_EVTOUT0+count;
|
||||
+
|
||||
+ info[count]->irq_flags = IRQF_SHARED;
|
||||
+ info[count]->handler = pruss_handler;
|
||||
+
|
||||
+ ret = uio_register_device(&dev->dev, info[count]);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ platform_set_drvdata(dev, info);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ if (ddr_virt_addr)
|
||||
+ dma_free_coherent(&dev->dev, regs_ddr->end - regs_ddr->start + 1, ddr_virt_addr, ddr_phy_addr);
|
||||
+ while (count--) {
|
||||
+ uio_unregister_device(info[count]);
|
||||
+ if (info[count]->name)
|
||||
+ kfree(info[count]->name);
|
||||
+ iounmap(info[count]->mem[0].internal_addr);
|
||||
+ }
|
||||
+ } else {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+out_free:
|
||||
+ for (count = 0; count < PRUSS_INSTANCE; count++) {
|
||||
+ if (info[count])
|
||||
+ kfree(info[count]);
|
||||
+ }
|
||||
+
|
||||
+ if (pruss_clk != NULL)
|
||||
+ clk_put(pruss_clk);
|
||||
+ if (ecap0_clk != NULL)
|
||||
+ clk_put(ecap0_clk);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int __devexit pruss_remove(struct platform_device *dev)
|
||||
+{
|
||||
+ int count = 0;
|
||||
+ struct uio_info **info;
|
||||
+
|
||||
+ info = (struct uio_info **)platform_get_drvdata(dev);
|
||||
+
|
||||
+ for (count = 0; count < PRUSS_INSTANCE; count++) {
|
||||
+ uio_unregister_device(info[count]);
|
||||
+ if (info[count]->name)
|
||||
+ kfree(info[count]->name);
|
||||
+
|
||||
+ }
|
||||
+ iounmap(info[0]->mem[0].internal_addr);
|
||||
+ iounmap(info[0]->mem[1].internal_addr);
|
||||
+ if (ddr_virt_addr)
|
||||
+ dma_free_coherent(&dev->dev, info[0]->mem[2].size, info[0]->mem[2].internal_addr, info[0]->mem[2].addr);
|
||||
+
|
||||
+ for (count = 0; count < PRUSS_INSTANCE; count++) {
|
||||
+ if (info[count])
|
||||
+ kfree(info[count]);
|
||||
+ }
|
||||
+
|
||||
+ platform_set_drvdata(dev, NULL);
|
||||
+
|
||||
+ if (pruss_clk != NULL)
|
||||
+ clk_put(pruss_clk);
|
||||
+ if (ecap0_clk != NULL)
|
||||
+ clk_put(ecap0_clk);
|
||||
+
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver pruss_driver = {
|
||||
+ .probe = pruss_probe,
|
||||
+ .remove = __devexit_p(pruss_remove),
|
||||
+ .driver = {
|
||||
+ .name = DRV_NAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int __init pruss_init_module(void)
|
||||
+{
|
||||
+ return platform_driver_register(&pruss_driver);
|
||||
+}
|
||||
+module_init(pruss_init_module);
|
||||
+
|
||||
+static void __exit pruss_exit_module(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&pruss_driver);
|
||||
+}
|
||||
+module_exit(pruss_exit_module);
|
||||
+
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_VERSION(DRV_VERSION);
|
||||
+MODULE_AUTHOR("Amit Chatterjee <amit.chatterjee@ti.com>");
|
||||
--
|
||||
1.7.0.4
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
From: Melissa Watkins <m-watkins@ti.com>
|
||||
Date: Wed, 24 Nov 2010 04:18:07 -0600
|
||||
Subject: [PATCH 2/3] uio_pruss2: Platform changes
|
||||
|
||||
Adding resources supporting the uio_pru driver within the
|
||||
da850 (omapl138) device.
|
||||
|
||||
Signed-off-by: Amit Chatterjee <amit.chatterjee@ti.com>
|
||||
Signed-off-by: Melissa Watkins <m-watkins@ti.com>
|
||||
---
|
||||
arch/arm/configs/da850_omapl138_defconfig | 8 +++-
|
||||
arch/arm/mach-davinci/board-da850-evm.c | 3 +
|
||||
arch/arm/mach-davinci/da850.c | 38 +++++++++++++-
|
||||
arch/arm/mach-davinci/devices-da8xx.c | 75 ++++++++++++++++++++++++++++
|
||||
arch/arm/mach-davinci/include/mach/da8xx.h | 3 +
|
||||
5 files changed, 124 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/configs/da850_omapl138_defconfig b/arch/arm/configs/da850_omapl138_defconfig
|
||||
index b312050..baebec8 100644
|
||||
--- a/arch/arm/configs/da850_omapl138_defconfig
|
||||
+++ b/arch/arm/configs/da850_omapl138_defconfig
|
||||
@@ -1361,6 +1361,7 @@ CONFIG_USB_MUSB_HDRC=y
|
||||
CONFIG_USB_MUSB_SOC=y
|
||||
CONFIG_USB_MUSB_HOST=y
|
||||
# CONFIG_USB_MUSB_PERIPHERAL is not set
|
||||
+# CONFIG_USB_MUSB_DUAL_ROLE is not set
|
||||
# CONFIG_USB_MUSB_OTG is not set
|
||||
CONFIG_USB_MUSB_HDRC_HCD=y
|
||||
# CONFIG_MUSB_PIO_ONLY is not set
|
||||
@@ -1535,7 +1536,12 @@ CONFIG_RTC_INTF_DEV=y
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
-# CONFIG_UIO is not set
|
||||
+CONFIG_UIO=y
|
||||
+# CONFIG_UIO_PDRV is not set
|
||||
+# CONFIG_UIO_PDRV_GENIRQ is not set
|
||||
+# CONFIG_UIO_SMX is not set
|
||||
+# CONFIG_UIO_SERCOS3 is not set
|
||||
+CONFIG_UIO_PRUSS=m
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
|
||||
index 009e9b5..1687c7c 100755
|
||||
--- a/arch/arm/mach-davinci/board-da850-evm.c
|
||||
+++ b/arch/arm/mach-davinci/board-da850-evm.c
|
||||
@@ -1070,6 +1070,9 @@ static __init void da850_evm_init(void)
|
||||
|
||||
platform_device_register(&da850_gpio_i2c);
|
||||
|
||||
+ /* Register PRUSS device */
|
||||
+ da8xx_register_pruss();
|
||||
+
|
||||
ret = da8xx_register_watchdog();
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: watchdog registration failed: %d\n",
|
||||
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
|
||||
index 513ae85..8bd1919 100755
|
||||
--- a/arch/arm/mach-davinci/da850.c
|
||||
+++ b/arch/arm/mach-davinci/da850.c
|
||||
@@ -237,6 +237,13 @@ static struct clk tptc2_clk = {
|
||||
.flags = ALWAYS_ENABLED,
|
||||
};
|
||||
|
||||
+static struct clk pruss_clk = {
|
||||
+ .name = "pruss",
|
||||
+ .parent = &pll0_sysclk2,
|
||||
+ .lpsc = DA8XX_LPSC0_DMAX,
|
||||
+ .flags = ALWAYS_ENABLED,
|
||||
+};
|
||||
+
|
||||
static struct clk uart0_clk = {
|
||||
.name = "uart0",
|
||||
.parent = &pll0_sysclk2,
|
||||
@@ -385,13 +392,37 @@ static struct clk usb20_clk = {
|
||||
.gpsc = 1,
|
||||
};
|
||||
|
||||
-
|
||||
static struct clk sata_clk = {
|
||||
.name = "ahci",
|
||||
.parent = &pll0_sysclk2,
|
||||
.lpsc = DA850_LPSC1_SATA,
|
||||
.gpsc = 1,
|
||||
};
|
||||
+
|
||||
+static struct clk ecap0_clk = {
|
||||
+ .name = "ecap0",
|
||||
+ .parent = &pll0_sysclk2,
|
||||
+ .lpsc = DA8XX_LPSC1_ECAP,
|
||||
+ .flags = DA850_CLK_ASYNC3,
|
||||
+ .gpsc = 1,
|
||||
+};
|
||||
+
|
||||
+static struct clk ecap1_clk = {
|
||||
+ .name = "ecap1",
|
||||
+ .parent = &pll0_sysclk2,
|
||||
+ .lpsc = DA8XX_LPSC1_ECAP,
|
||||
+ .flags = DA850_CLK_ASYNC3,
|
||||
+ .gpsc = 1,
|
||||
+};
|
||||
+
|
||||
+static struct clk ecap2_clk = {
|
||||
+ .name = "ecap2",
|
||||
+ .parent = &pll0_sysclk2,
|
||||
+ .lpsc = DA8XX_LPSC1_ECAP,
|
||||
+ .flags = DA850_CLK_ASYNC3,
|
||||
+ .gpsc = 1,
|
||||
+};
|
||||
+
|
||||
static struct clk_lookup da850_clks[] = {
|
||||
CLK(NULL, "ref", &ref_clk),
|
||||
CLK(NULL, "pll0", &pll0_clk),
|
||||
@@ -419,6 +450,7 @@ static struct clk_lookup da850_clks[] = {
|
||||
CLK(NULL, "tptc1", &tptc1_clk),
|
||||
CLK(NULL, "tpcc1", &tpcc1_clk),
|
||||
CLK(NULL, "tptc2", &tptc2_clk),
|
||||
+ CLK(NULL, "pruss", &pruss_clk),
|
||||
CLK(NULL, "uart0", &uart0_clk),
|
||||
CLK(NULL, "uart1", &uart1_clk),
|
||||
CLK(NULL, "uart2", &uart2_clk),
|
||||
@@ -441,7 +473,9 @@ static struct clk_lookup da850_clks[] = {
|
||||
CLK(NULL, "usb11", &usb11_clk),
|
||||
CLK(NULL, "usb20", &usb20_clk),
|
||||
CLK(NULL, "ahci", &sata_clk),
|
||||
-
|
||||
+ CLK(NULL, "ecap0", &ecap0_clk),
|
||||
+ CLK(NULL, "ecap1", &ecap1_clk),
|
||||
+ CLK(NULL, "ecap2", &ecap2_clk),
|
||||
CLK(NULL, NULL, NULL),
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
|
||||
index 0842590..94979b3 100755
|
||||
--- a/arch/arm/mach-davinci/devices-da8xx.c
|
||||
+++ b/arch/arm/mach-davinci/devices-da8xx.c
|
||||
@@ -972,6 +972,81 @@ int __init da8xx_register_sata(void)
|
||||
return platform_device_register(&da850_ahci_device);
|
||||
}
|
||||
|
||||
+static struct resource pruss_resources[] = {
|
||||
+ [0] = {
|
||||
+ .start = DA8XX_PRUSS_BASE,
|
||||
+ .end = DA8XX_PRUSS_BASE + SZ_64K - 1,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+ [1] = {
|
||||
+ .start = DA8XX_L3RAM_BASE,
|
||||
+ .end = DA8XX_L3RAM_BASE + SZ_128K - 1,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+ [2] = {
|
||||
+ .start = 0,
|
||||
+ .end = SZ_256K - 1,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+
|
||||
+ [3] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT0,
|
||||
+ .end = IRQ_DA8XX_EVTOUT0,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [4] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT1,
|
||||
+ .end = IRQ_DA8XX_EVTOUT1,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [5] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT2,
|
||||
+ .end = IRQ_DA8XX_EVTOUT2,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [6] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT3,
|
||||
+ .end = IRQ_DA8XX_EVTOUT3,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [7] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT4,
|
||||
+ .end = IRQ_DA8XX_EVTOUT4,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [8] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT5,
|
||||
+ .end = IRQ_DA8XX_EVTOUT5,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [9] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT6,
|
||||
+ .end = IRQ_DA8XX_EVTOUT6,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ [10] = {
|
||||
+ .start = IRQ_DA8XX_EVTOUT7,
|
||||
+ .end = IRQ_DA8XX_EVTOUT7,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct platform_device pruss_device = {
|
||||
+ .name = "pruss",
|
||||
+ .id = 0,
|
||||
+ .num_resources = ARRAY_SIZE(pruss_resources),
|
||||
+ .resource = pruss_resources,
|
||||
+ .dev = {
|
||||
+ .coherent_dma_mask = 0xffffffff,
|
||||
+ }
|
||||
+
|
||||
+};
|
||||
+
|
||||
+int __init da8xx_register_pruss()
|
||||
+{
|
||||
+ return platform_device_register(&pruss_device);
|
||||
+}
|
||||
+
|
||||
#define CFGCHIP2 DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)
|
||||
/*
|
||||
* Configure the USB PHY for DA8xx platforms.
|
||||
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
|
||||
index f76433f..632d7e2 100755
|
||||
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
|
||||
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
|
||||
@@ -75,6 +75,8 @@ extern void __iomem *da8xx_syscfg1_base;
|
||||
#define DA8XX_USB0_BASE 0x01e00000
|
||||
#define DA850_SATA_BASE 0x01E18000
|
||||
#define DA850_SATA_CLK_PWRDN 0x01E2C018
|
||||
+#define DA8XX_PRUSS_BASE 0x01C30000
|
||||
+#define DA8XX_L3RAM_BASE 0x80000000
|
||||
|
||||
#define PINMUX0 0x00
|
||||
#define PINMUX1 0x04
|
||||
@@ -162,6 +164,7 @@ int __init da850_register_vpif_capture(struct vpif_capture_config
|
||||
|
||||
int cppi41_init(void);
|
||||
int da8xx_register_sata(void);
|
||||
+int da8xx_register_pruss(void);
|
||||
|
||||
|
||||
extern struct platform_device da8xx_serial_device;
|
||||
--
|
||||
1.7.0.4
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From: Melissa Watkins <m-watkins@ti.com>
|
||||
Date: Wed, 24 Nov 2010 04:20:24 -0600
|
||||
Subject: [PATCH 3/3] uio_pruss3: Workarounds put into core code to support our devices
|
||||
|
||||
This patch modifies uio.c to support the uio_pruss driver. The UIO user space module relies on IO memory being mapped to user space. The IO map works fine for all mapped virtual addresses less than 0x80000000. However for the uio_pruss driver, the virtual address is on the higher side, so it fails. The fix added in this patch is mainly to check if the page map returned is correct.
|
||||
|
||||
Signed-off-by: Amit Chatterjee <amit.chatterjee@ti.com>
|
||||
Signed-off-by: Melissa Watkins <m-watkins@ti.com>
|
||||
---
|
||||
drivers/uio/uio.c | 9 +++++++--
|
||||
1 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
|
||||
index e941367..3241d26 100644
|
||||
--- a/drivers/uio/uio.c
|
||||
+++ b/drivers/uio/uio.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/idr.h>
|
||||
-#include <linux/sched.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/uio_driver.h>
|
||||
@@ -615,7 +615,7 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
|
||||
for (mi = 0; mi < MAX_UIO_MAPS; mi++) {
|
||||
if (idev->info->mem[mi].size == 0)
|
||||
return -1;
|
||||
- if (vma->vm_pgoff == mi)
|
||||
+ if ((idev->info->mem[mi].addr) >> PAGE_SHIFT == vma->vm_pgoff)
|
||||
return mi;
|
||||
}
|
||||
return -1;
|
||||
@@ -659,7 +664,7 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static const struct vm_operations_struct uio_vm_ops = {
|
||||
+static struct vm_operations_struct uio_vm_ops = {
|
||||
.open = uio_vma_open,
|
||||
.close = uio_vma_close,
|
||||
.fault = uio_vma_fault,
|
||||
--
|
||||
1.7.0.4
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1951
extras/recipes-kernel/linux/linux-davinci/omapl138/defconfig
Normal file
1951
extras/recipes-kernel/linux/linux-davinci/omapl138/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,160 @@
|
||||
--- /tmp/mach-types 2009-03-17 16:55:42.000000000 +0100
|
||||
+++ git/arch/arm/tools/mach-types 2009-03-17 16:56:28.000000000 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
#
|
||||
# http://www.arm.linux.org.uk/developer/machines/?action=new
|
||||
#
|
||||
-# Last update: Sun Nov 30 16:39:36 2008
|
||||
+# Last update: Tue Mar 17 15:56:28 2009
|
||||
#
|
||||
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
|
||||
#
|
||||
@@ -1811,7 +1811,7 @@
|
||||
jade MACH_JADE JADE 1821
|
||||
ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822
|
||||
gprisc3 MACH_GPRISC3 GPRISC3 1823
|
||||
-stamp9260 MACH_STAMP9260 STAMP9260 1824
|
||||
+stamp9g20 MACH_STAMP9G20 STAMP9G20 1824
|
||||
smdk6430 MACH_SMDK6430 SMDK6430 1825
|
||||
smdkc100 MACH_SMDKC100 SMDKC100 1826
|
||||
tavorevb MACH_TAVOREVB TAVOREVB 1827
|
||||
@@ -1993,4 +1993,138 @@
|
||||
benzina MACH_BENZINA BENZINA 2003
|
||||
blaze MACH_BLAZE BLAZE 2004
|
||||
linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005
|
||||
-htcvenus MACH_HTCVENUS HTCVENUS 2006
|
||||
+htckovsky MACH_HTCVENUS HTCVENUS 2006
|
||||
+sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007
|
||||
+hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008
|
||||
+sapphira MACH_SAPPHIRA SAPPHIRA 2009
|
||||
+dack_sda_01 MACH_DACK_SDA_01 DACK_SDA_01 2010
|
||||
+armbox MACH_ARMBOX ARMBOX 2011
|
||||
+harris_rvp MACH_HARRIS_RVP HARRIS_RVP 2012
|
||||
+ribaldo MACH_RIBALDO RIBALDO 2013
|
||||
+agora MACH_AGORA AGORA 2014
|
||||
+omap3_mini MACH_OMAP3_MINI OMAP3_MINI 2015
|
||||
+a9sam6432_b MACH_A9SAM6432_B A9SAM6432_B 2016
|
||||
+usg2410 MACH_USG2410 USG2410 2017
|
||||
+pc72052_i10_revb MACH_PC72052_I10_REVB PC72052_I10_REVB 2018
|
||||
+mx35_exm32 MACH_MX35_EXM32 MX35_EXM32 2019
|
||||
+topas910 MACH_TOPAS910 TOPAS910 2020
|
||||
+hyena MACH_HYENA HYENA 2021
|
||||
+pospax MACH_POSPAX POSPAX 2022
|
||||
+hdl_gx MACH_HDL_GX HDL_GX 2023
|
||||
+ctera_4bay MACH_CTERA_4BAY CTERA_4BAY 2024
|
||||
+ctera_plug_c MACH_CTERA_PLUG_C CTERA_PLUG_C 2025
|
||||
+crwea_plug_i MACH_CRWEA_PLUG_I CRWEA_PLUG_I 2026
|
||||
+egauge2 MACH_EGAUGE2 EGAUGE2 2027
|
||||
+didj MACH_DIDJ DIDJ 2028
|
||||
+m_s3c2443 MACH_MEISTER MEISTER 2029
|
||||
+htcblackstone MACH_HTCBLACKSTONE HTCBLACKSTONE 2030
|
||||
+cpuat9g20 MACH_CPUAT9G20 CPUAT9G20 2031
|
||||
+smdk6440 MACH_SMDK6440 SMDK6440 2032
|
||||
+omap_35xx_mvp MACH_OMAP_35XX_MVP OMAP_35XX_MVP 2033
|
||||
+ctera_plug_i MACH_CTERA_PLUG_I CTERA_PLUG_I 2034
|
||||
+pvg610_100 MACH_PVG610 PVG610 2035
|
||||
+hprw6815 MACH_HPRW6815 HPRW6815 2036
|
||||
+omap3_oswald MACH_OMAP3_OSWALD OMAP3_OSWALD 2037
|
||||
+nas4220b MACH_NAS4220B NAS4220B 2038
|
||||
+htcraphael_cdma MACH_HTCRAPHAEL_CDMA HTCRAPHAEL_CDMA 2039
|
||||
+htcdiamond_cdma MACH_HTCDIAMOND_CDMA HTCDIAMOND_CDMA 2040
|
||||
+scaler MACH_SCALER SCALER 2041
|
||||
+zylonite2 MACH_ZYLONITE2 ZYLONITE2 2042
|
||||
+aspenite MACH_ASPENITE ASPENITE 2043
|
||||
+teton MACH_TETON TETON 2044
|
||||
+ttc_dkb MACH_TTC_DKB TTC_DKB 2045
|
||||
+bishop2 MACH_BISHOP2 BISHOP2 2046
|
||||
+ippv5 MACH_IPPV5 IPPV5 2047
|
||||
+farm926 MACH_FARM926 FARM926 2048
|
||||
+mmccpu MACH_MMCCPU MMCCPU 2049
|
||||
+sgmsfl MACH_SGMSFL SGMSFL 2050
|
||||
+tt8000 MACH_TT8000 TT8000 2051
|
||||
+zrn4300lp MACH_ZRN4300LP ZRN4300LP 2052
|
||||
+mptc MACH_MPTC MPTC 2053
|
||||
+h6051 MACH_H6051 H6051 2054
|
||||
+pvg610_101 MACH_PVG610_101 PVG610_101 2055
|
||||
+stamp9261_pc_evb MACH_STAMP9261_PC_EVB STAMP9261_PC_EVB 2056
|
||||
+pelco_odysseus MACH_PELCO_ODYSSEUS PELCO_ODYSSEUS 2057
|
||||
+tny_a9260 MACH_TNY_A9260 TNY_A9260 2058
|
||||
+tny_a9g20 MACH_TNY_A9G20 TNY_A9G20 2059
|
||||
+aesop_mp2530f MACH_AESOP_MP2530F AESOP_MP2530F 2060
|
||||
+dx900 MACH_DX900 DX900 2061
|
||||
+cpodc2 MACH_CPODC2 CPODC2 2062
|
||||
+tilt_8925 MACH_TILT_8925 TILT_8925 2063
|
||||
+davinci_dm357_evm MACH_DAVINCI_DM357_EVM DAVINCI_DM357_EVM 2064
|
||||
+swordfish MACH_SWORDFISH SWORDFISH 2065
|
||||
+corvus MACH_CORVUS CORVUS 2066
|
||||
+taurus MACH_TAURUS TAURUS 2067
|
||||
+axm MACH_AXM AXM 2068
|
||||
+axc MACH_AXC AXC 2069
|
||||
+baby MACH_BABY BABY 2070
|
||||
+mp200 MACH_MP200 MP200 2071
|
||||
+pcm043 MACH_PCM043 PCM043 2072
|
||||
+hanlin_v3c MACH_HANLIN_V3C HANLIN_V3C 2073
|
||||
+kbk9g20 MACH_KBK9G20 KBK9G20 2074
|
||||
+adsturbog5 MACH_ADSTURBOG5 ADSTURBOG5 2075
|
||||
+avenger_lite1 MACH_AVENGER_LITE1 AVENGER_LITE1 2076
|
||||
+suc82x MACH_SUC SUC 2077
|
||||
+at91sam7s256 MACH_AT91SAM7S256 AT91SAM7S256 2078
|
||||
+mendoza MACH_MENDOZA MENDOZA 2079
|
||||
+kira MACH_KIRA KIRA 2080
|
||||
+mx1hbm MACH_MX1HBM MX1HBM 2081
|
||||
+quatro43xx MACH_QUATRO43XX QUATRO43XX 2082
|
||||
+quatro4230 MACH_QUATRO4230 QUATRO4230 2083
|
||||
+nsb400 MACH_NSB400 NSB400 2084
|
||||
+drp255 MACH_DRP255 DRP255 2085
|
||||
+thoth MACH_THOTH THOTH 2086
|
||||
+firestone MACH_FIRESTONE FIRESTONE 2087
|
||||
+asusp750 MACH_ASUSP750 ASUSP750 2088
|
||||
+ctera_dl MACH_CTERA_DL CTERA_DL 2089
|
||||
+socr MACH_SOCR SOCR 2090
|
||||
+htcoxygen MACH_HTCOXYGEN HTCOXYGEN 2091
|
||||
+heroc MACH_HEROC HEROC 2092
|
||||
+zeno6800 MACH_ZENO6800 ZENO6800 2093
|
||||
+sc2mcs MACH_SC2MCS SC2MCS 2094
|
||||
+gene100 MACH_GENE100 GENE100 2095
|
||||
+as353x MACH_AS353X AS353X 2096
|
||||
+sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097
|
||||
+at91sam9g20 MACH_AT91SAM9G20 AT91SAM9G20 2098
|
||||
+mv88f6192gtw_fe MACH_MV88F6192GTW_FE MV88F6192GTW_FE 2099
|
||||
+cc9200 MACH_CC9200 CC9200 2100
|
||||
+sm9200 MACH_SM9200 SM9200 2101
|
||||
+tp9200 MACH_TP9200 TP9200 2102
|
||||
+snapperdv MACH_SNAPPERDV SNAPPERDV 2103
|
||||
+avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104
|
||||
+avengers_lite1 MACH_AVENGERS_LITE1 AVENGERS_LITE1 2105
|
||||
+omap3axon MACH_OMAP3AXON OMAP3AXON 2106
|
||||
+ma8xx MACH_MA8XX MA8XX 2107
|
||||
+mp201ek MACH_MP201EK MP201EK 2108
|
||||
+davinci_tux MACH_DAVINCI_TUX DAVINCI_TUX 2109
|
||||
+mpa1600 MACH_MPA1600 MPA1600 2110
|
||||
+pelco_troy MACH_PELCO_TROY PELCO_TROY 2111
|
||||
+nsb667 MACH_NSB667 NSB667 2112
|
||||
+rovers5_4mpix MACH_ROVERS5_4MPIX ROVERS5_4MPIX 2113
|
||||
+twocom MACH_TWOCOM TWOCOM 2114
|
||||
+ubisys_p9_rcu3r2 MACH_UBISYS_P9_RCU3R2 UBISYS_P9_RCU3R2 2115
|
||||
+hero_espresso MACH_HERO_ESPRESSO HERO_ESPRESSO 2116
|
||||
+afeusb MACH_AFEUSB AFEUSB 2117
|
||||
+t830 MACH_T830 T830 2118
|
||||
+spd8020_cc MACH_SPD8020_CC SPD8020_CC 2119
|
||||
+om_3d7k MACH_OM_3D7K OM_3D7K 2120
|
||||
+picocom2 MACH_PICOCOM2 PICOCOM2 2121
|
||||
+uwg4mx27 MACH_UWG4MX27 UWG4MX27 2122
|
||||
+uwg4mx31 MACH_UWG4MX31 UWG4MX31 2123
|
||||
+cherry MACH_CHERRY CHERRY 2124
|
||||
+mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125
|
||||
+s3c2440turkiye MACH_S3C2440TURKIYE S3C2440TURKIYE 2126
|
||||
+tx37 MACH_TX37 TX37 2127
|
||||
+sbc2800_9g20 MACH_SBC2800_9G20 SBC2800_9G20 2128
|
||||
+benzglb MACH_BENZGLB BENZGLB 2129
|
||||
+benztd MACH_BENZTD BENZTD 2130
|
||||
+cartesio_plus MACH_CARTESIO_PLUS CARTESIO_PLUS 2131
|
||||
+solrad_g20 MACH_SOLRAD_G20 SOLRAD_G20 2132
|
||||
+mx27wallace MACH_MX27WALLACE MX27WALLACE 2133
|
||||
+fmzwebmodul MACH_FMZWEBMODUL FMZWEBMODUL 2134
|
||||
+rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135
|
||||
+smallogger MACH_SMALLOGGER SMALLOGGER 2136
|
||||
+ccw9p9215 MACH_CCW9P9215 CCW9P9215 2137
|
||||
+dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138
|
||||
+ts219 MACH_TS219 TS219 2139
|
||||
+tny_a9263 MACH_TNY_A9263 TNY_A9263 2140
|
||||
57
extras/recipes-kernel/linux/linux-davinci_git.bb
Normal file
57
extras/recipes-kernel/linux/linux-davinci_git.bb
Normal file
@@ -0,0 +1,57 @@
|
||||
require multi-kernel.inc
|
||||
|
||||
DESCRIPTION = "Linux kernel for DaVinci processors"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
COMPATIBLE_MACHINE = "hawkboard"
|
||||
|
||||
DEFAULT_PREFERENCE_hawkboard = "1"
|
||||
|
||||
BRANCH = "master"
|
||||
|
||||
SRC_URI_append = " file://defconfig "
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# The main PR is now using MACHINE_KERNEL_PR, for davinci see conf/machine/include/davinci.inc
|
||||
|
||||
# OMAPL tracking master branch - PSP 3.20.00.12
|
||||
|
||||
ARAGO_L1_REV = "2acf935c01b9adb50164d421c40cdc5862b9e143"
|
||||
ARAGO_L1_BR = "master"
|
||||
ARAGO_L1_PV = "2.6.32+2.6.33-rc4-${PR}+gitr${SRCREV}"
|
||||
ARAGO_L1_URI = "git://arago-project.org/git/projects/linux-omapl1.git;protocol=git;branch=${BRANCH} "
|
||||
|
||||
SRCREV_hawkboard = "${ARAGO_L1_REV}"
|
||||
|
||||
PV_omapl138 = "${ARAGO_L1_PV}"
|
||||
|
||||
BRANCH_omapl138 = "${ARAGO_L1_BR}"
|
||||
|
||||
SRC_URI_append_omapl138 = "${ARAGO_L1_URI}"
|
||||
|
||||
SRC_URI_append_omapl138 = " file://logo_linux_clut224.ppm \
|
||||
file://0001-ahci-ti-Fix-currently-harmless-typo-in-SATA-PHY.patch \
|
||||
file://0002-ahci-ti-Update-SATA-PHY-configuration-RXCDR.patch \
|
||||
file://0001-board-da850-evm-Disable-NAND-SUBPAGE.patch \
|
||||
file://0001-uio_pruss1-Core-driver-addition.patch \
|
||||
file://0002-uio_pruss2-Platform-changes.patch \
|
||||
file://0003-uio_pruss3-Workarounds-put-into-core-code.patch \
|
||||
file://0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch \
|
||||
file://0001-ARM-6329-1-wire-up-sys_accept4-on-ARM.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_hawkboard = " \
|
||||
file://patch-2.6.33rc4-psp-to-hawkboard.patch \
|
||||
file://0001-board-da850-hawk-Disable-NAND-SUBPAGE.patch \
|
||||
"
|
||||
|
||||
# Perf in 2.6.33rc has broken perl handling, so disable it
|
||||
do_compile_perf() {
|
||||
:
|
||||
}
|
||||
|
||||
do_install_perf() {
|
||||
:
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
From 16c1bdb30f1bcd750b29dffd2ef3003be2d30610 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Fri, 20 May 2011 12:48:37 +0200
|
||||
Subject: [PATCH 1/7] OMAP3: beagle: add support for beagleboard xM revision C
|
||||
|
||||
The USB enable GPIO has been inverted and the USER button moved.
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 34 +++++++++++++++++++++++-------
|
||||
1 files changed, 26 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 2de4b02..77bafa8 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -62,7 +62,9 @@
|
||||
* AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
|
||||
* C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
|
||||
* C4 = GPIO173, GPIO172, GPIO171: 1 0 1
|
||||
- * XM = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1
|
||||
+ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
|
||||
*/
|
||||
enum {
|
||||
OMAP3BEAGLE_BOARD_UNKN = 0,
|
||||
@@ -70,6 +72,7 @@ enum {
|
||||
OMAP3BEAGLE_BOARD_C1_3,
|
||||
OMAP3BEAGLE_BOARD_C4,
|
||||
OMAP3BEAGLE_BOARD_XM,
|
||||
+ OMAP3BEAGLE_BOARD_XMC,
|
||||
};
|
||||
|
||||
static u8 omap3_beagle_version;
|
||||
@@ -124,9 +127,18 @@ static void __init omap3_beagle_init_rev(void)
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
break;
|
||||
+ case 1:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
+ break;
|
||||
default:
|
||||
- printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
|
||||
- omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
|
||||
+ printk(KERN_INFO
|
||||
+ "OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n", beagle_rev);
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -278,7 +290,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
{
|
||||
int r;
|
||||
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if (cpu_is_omap3630()) {
|
||||
mmc[0].gpio_wp = -EINVAL;
|
||||
} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
|
||||
@@ -298,7 +310,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
/* REVISIT: need ehci-omap hooks for external VBUS
|
||||
* power switch and overcurrent detect
|
||||
*/
|
||||
- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM
|
||||
+ && omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC) {
|
||||
r = gpio_request(gpio + 1, "EHCI_nOC");
|
||||
if (!r) {
|
||||
r = gpio_direction_input(gpio + 1);
|
||||
@@ -320,7 +333,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
|
||||
|
||||
/* DVI reset GPIO is different between beagle revisions */
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
|
||||
+ if (cpu_is_omap3630())
|
||||
beagle_dvi_device.reset_gpio = 129;
|
||||
else
|
||||
beagle_dvi_device.reset_gpio = 170;
|
||||
@@ -334,7 +347,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
* P7/P8 revisions(prototype): Camera EN
|
||||
* A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
|
||||
*/
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if (cpu_is_omap3630()) {
|
||||
r = gpio_request(gpio + 1, "nDVI_PWR_EN");
|
||||
if (!r) {
|
||||
r = gpio_direction_output(gpio + 1, 0);
|
||||
@@ -625,7 +638,7 @@ static void __init beagle_opp_init(void)
|
||||
}
|
||||
|
||||
/* Custom OPP enabled for XM */
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ if (cpu_is_omap3630()) {
|
||||
struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
|
||||
struct omap_hwmod *dh = omap_hwmod_lookup("iva");
|
||||
struct device *dev;
|
||||
@@ -665,6 +678,11 @@ static void __init omap3_beagle_init(void)
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap3_beagle_init_rev();
|
||||
omap3_beagle_i2c_init();
|
||||
+
|
||||
+ if (cpu_is_omap3630()) {
|
||||
+ gpio_buttons[0].gpio = 4;
|
||||
+ }
|
||||
+
|
||||
platform_add_devices(omap3_beagle_devices,
|
||||
ARRAY_SIZE(omap3_beagle_devices));
|
||||
omap_display_init(&beagle_dss_data);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
From 27494059a5d005b8cad4e0e8640ff031b86220dc Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Fri, 20 May 2011 13:06:24 +0200
|
||||
Subject: [PATCH 2/7] OMAP3: beagle: add support for expansionboards
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 272 ++++++++++++++++++++++++++++++-
|
||||
1 files changed, 269 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 77bafa8..db285e1 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/opp.h>
|
||||
@@ -154,6 +155,167 @@ fail0:
|
||||
return;
|
||||
}
|
||||
|
||||
+char expansionboard_name[16];
|
||||
+
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+#include <linux/regulator/fixed.h>
|
||||
+#include <linux/wl12xx.h>
|
||||
+
|
||||
+#define OMAP_BEAGLE_WLAN_EN_GPIO (139)
|
||||
+#define OMAP_BEAGLE_BT_EN_GPIO (138)
|
||||
+#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137)
|
||||
+#define OMAP_BEAGLE_FM_EN_BT_WU (136)
|
||||
+
|
||||
+struct wl12xx_platform_data omap_beagle_wlan_data __initdata = {
|
||||
+ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO),
|
||||
+ .board_ref_clock = 2, /* 38.4 MHz */
|
||||
+};
|
||||
+
|
||||
+static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1};
|
||||
+static struct platform_device wl12xx_device = {
|
||||
+ .name = "kim",
|
||||
+ .id = -1,
|
||||
+ .dev.platform_data = &gpios,
|
||||
+};
|
||||
+
|
||||
+static struct omap2_hsmmc_info mmcbbt[] = {
|
||||
+ {
|
||||
+ .mmc = 1,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
+ .gpio_wp = 29,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "wl1271",
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
|
||||
+ .gpio_wp = -EINVAL,
|
||||
+ .gpio_cd = -EINVAL,
|
||||
+ .ocr_mask = MMC_VDD_165_195,
|
||||
+ .nonremovable = true,
|
||||
+ },
|
||||
+ {} /* Terminator */
|
||||
+ };
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vmmc2_supply =
|
||||
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
+
|
||||
+static struct regulator_init_data beagle_vmmc2 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1850000,
|
||||
+ .max_uV = 1850000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &beagle_vmmc2_supply,
|
||||
+};
|
||||
+
|
||||
+static struct fixed_voltage_config beagle_vwlan = {
|
||||
+ .supply_name = "vwl1271",
|
||||
+ .microvolts = 1800000, /* 1.8V */
|
||||
+ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO,
|
||||
+ .startup_delay = 70000, /* 70ms */
|
||||
+ .enable_high = 1,
|
||||
+ .enabled_at_boot = 0,
|
||||
+ .init_data = &beagle_vmmc2,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device omap_vwlan_device = {
|
||||
+ .name = "reg-fixed-voltage",
|
||||
+ .id = 1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &beagle_vwlan,
|
||||
+ },
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "enc28j60",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 20000000,
|
||||
+ .controller_data = &enc28j60_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_enc28j60_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
|
||||
+ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_enc28j60_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config ks8851_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "ks8851",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 36000000,
|
||||
+ .controller_data = &ks8851_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_ks8851_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0);
|
||||
+ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy2_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -272,6 +434,12 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
.gpio_wp = 29,
|
||||
},
|
||||
+ {
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA,
|
||||
+ .transceiver = true,
|
||||
+ .ocr_mask = 0x00100000, /* 3.3V */
|
||||
+ },
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
@@ -301,11 +469,25 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
}
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi")) {
|
||||
+ omap2_hsmmc_init(mmcbbt);
|
||||
+ /* link regulators to MMC adapters */
|
||||
+ beagle_vmmc1_supply.dev = mmcbbt[0].dev;
|
||||
+ beagle_vsim_supply.dev = mmcbbt[0].dev;
|
||||
+ } else {
|
||||
+ omap2_hsmmc_init(mmc);
|
||||
+ /* link regulators to MMC adapters */
|
||||
+ beagle_vmmc1_supply.dev = mmc[0].dev;
|
||||
+ beagle_vsim_supply.dev = mmc[0].dev;
|
||||
+ }
|
||||
+#else
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters */
|
||||
beagle_vmmc1_supply.dev = mmc[0].dev;
|
||||
beagle_vsim_supply.dev = mmc[0].dev;
|
||||
+#endif
|
||||
|
||||
/* REVISIT: need ehci-omap hooks for external VBUS
|
||||
* power switch and overcurrent detect
|
||||
@@ -466,7 +648,7 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.vpll2 = &beagle_vpll2,
|
||||
};
|
||||
|
||||
-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
|
||||
+static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl4030", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
@@ -481,10 +663,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_RTC_DRV_DS1307) || \
|
||||
+ defined(CONFIG_RTC_DRV_DS1307_MODULE)
|
||||
+
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("ds1307", 0x68),
|
||||
+ },
|
||||
+};
|
||||
+#else
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
|
||||
+#endif
|
||||
+
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
|
||||
- ARRAY_SIZE(beagle_i2c_boardinfo));
|
||||
+ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo,
|
||||
+ ARRAY_SIZE(beagle_i2c1_boardinfo));
|
||||
+ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo,
|
||||
+ ARRAY_SIZE(beagle_i2c2_boardinfo));
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
|
||||
@@ -627,6 +823,15 @@ static struct omap_musb_board_data musb_board_data = {
|
||||
.power = 100,
|
||||
};
|
||||
|
||||
+static int __init expansionboard_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard_name, str, 16);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init beagle_opp_init(void)
|
||||
{
|
||||
int r = 0;
|
||||
@@ -693,6 +898,65 @@ static void __init omap3_beagle_init(void)
|
||||
/* REVISIT leave DVI powered down until it's needed ... */
|
||||
gpio_direction_output(170, true);
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "zippy"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
|
||||
+ omap3beagle_enc28j60_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "zippy2"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n");
|
||||
+ omap3beagle_ks8851_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "trainer"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
|
||||
+ gpio_request(130, "sysfs");
|
||||
+ gpio_export(130, 1);
|
||||
+ gpio_request(131, "sysfs");
|
||||
+ gpio_export(131, 1);
|
||||
+ gpio_request(132, "sysfs");
|
||||
+ gpio_export(132, 1);
|
||||
+ gpio_request(133, "sysfs");
|
||||
+ gpio_export(133, 1);
|
||||
+ gpio_request(134, "sysfs");
|
||||
+ gpio_export(134, 1);
|
||||
+ gpio_request(135, "sysfs");
|
||||
+ gpio_export(135, 1);
|
||||
+ gpio_request(136, "sysfs");
|
||||
+ gpio_export(136, 1);
|
||||
+ gpio_request(137, "sysfs");
|
||||
+ gpio_export(137, 1);
|
||||
+ gpio_request(138, "sysfs");
|
||||
+ gpio_export(138, 1);
|
||||
+ gpio_request(139, "sysfs");
|
||||
+ gpio_export(139, 1);
|
||||
+ gpio_request(140, "sysfs");
|
||||
+ gpio_export(140, 1);
|
||||
+ gpio_request(141, "sysfs");
|
||||
+ gpio_export(141, 1);
|
||||
+ gpio_request(162, "sysfs");
|
||||
+ gpio_export(162, 1);
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi"))
|
||||
+ {
|
||||
+ if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
|
||||
+ pr_err("error setting wl12xx data\n");
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n");
|
||||
+ platform_device_register(&wl12xx_device);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n");
|
||||
+ platform_device_register(&omap_vwlan_device);
|
||||
+ }
|
||||
+
|
||||
usb_musb_init(&musb_board_data);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
omap3beagle_flash_init();
|
||||
@@ -705,6 +969,8 @@ static void __init omap3_beagle_init(void)
|
||||
beagle_opp_init();
|
||||
}
|
||||
|
||||
+early_param("buddy", expansionboard_setup);
|
||||
+
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.boot_params = 0x80000100,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 91e701f3287923d11dd295b6a62186909e362503 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sat, 21 May 2011 16:18:30 +0200
|
||||
Subject: [PATCH 3/7] OMAP3: beagle: add MADC support
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index db285e1..da4ba50 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -634,6 +634,10 @@ static struct twl4030_codec_data beagle_codec_data = {
|
||||
.audio = &beagle_audio_data,
|
||||
};
|
||||
|
||||
+static struct twl4030_madc_platform_data beagle_madc_data = {
|
||||
+ .irq_line = 1,
|
||||
+};
|
||||
+
|
||||
static struct twl4030_platform_data beagle_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
@@ -642,6 +646,7 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.usb = &beagle_usb_data,
|
||||
.gpio = &beagle_gpio_data,
|
||||
.codec = &beagle_codec_data,
|
||||
+ .madc = &beagle_madc_data,
|
||||
.vmmc1 = &beagle_vmmc1,
|
||||
.vsim = &beagle_vsim,
|
||||
.vdac = &beagle_vdac,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
From 9d7f46abab88c74e674461a2f4e9ab35b524a6ef Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 25 May 2011 08:56:06 +0200
|
||||
Subject: [PATCH 4/7] OMAP3: beagle: add regulators for camera interface
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 50 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index da4ba50..211cbdf 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -453,6 +453,44 @@ static struct regulator_consumer_supply beagle_vsim_supply = {
|
||||
|
||||
static struct gpio_led gpio_leds[];
|
||||
|
||||
+static struct regulator_consumer_supply beagle_vaux3_supply = {
|
||||
+ .supply = "cam_1v8",
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vaux4_supply = {
|
||||
+ .supply = "cam_2v8",
|
||||
+};
|
||||
+
|
||||
+/* VAUX3 for CAM_1V8 */
|
||||
+static struct regulator_init_data beagle_vaux3 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &beagle_vaux3_supply,
|
||||
+};
|
||||
+
|
||||
+/* VAUX4 for CAM_2V8 */
|
||||
+static struct regulator_init_data beagle_vaux4 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &beagle_vaux4_supply,
|
||||
+};
|
||||
+
|
||||
static int beagle_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
@@ -504,6 +542,16 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
|
||||
}
|
||||
|
||||
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ /*
|
||||
+ * Power on camera interface - only on pre-production, not
|
||||
+ * needed on production boards
|
||||
+ */
|
||||
+ gpio_request(gpio + 2, "CAM_EN");
|
||||
+ gpio_direction_output(gpio + 2, 1);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/*
|
||||
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
* high / others active low)
|
||||
@@ -651,6 +699,8 @@ static struct twl4030_platform_data beagle_twldata = {
|
||||
.vsim = &beagle_vsim,
|
||||
.vdac = &beagle_vdac,
|
||||
.vpll2 = &beagle_vpll2,
|
||||
+ .vaux3 = &beagle_vaux3,
|
||||
+ .vaux4 = &beagle_vaux4,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From aa93263ed7827e33148396656b7e7ab4579509a5 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 25 May 2011 08:57:40 +0200
|
||||
Subject: [PATCH 5/7] OMAP3: beagle: HACK! add in 1GHz OPP
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 211cbdf..221bfda 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -911,11 +911,13 @@ static void __init beagle_opp_init(void)
|
||||
/* Enable MPU 1GHz and lower opps */
|
||||
dev = &mh->od->pdev.dev;
|
||||
r = opp_enable(dev, 800000000);
|
||||
+ r |= opp_enable(dev, 1000000000);
|
||||
/* TODO: MPU 1GHz needs SR and ABB */
|
||||
|
||||
/* Enable IVA 800MHz and lower opps */
|
||||
dev = &dh->od->pdev.dev;
|
||||
r |= opp_enable(dev, 660000000);
|
||||
+ r |= opp_enable(dev, 800000000);
|
||||
/* TODO: DSP 800MHz needs SR and ABB */
|
||||
if (r) {
|
||||
pr_err("%s: failed to enable higher opp %d\n",
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From dd2c7ba245ec1b17e3d323a6c4a1cad9697dbbbe Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 15 Jun 2011 16:25:50 +0200
|
||||
Subject: [PATCH 6/7] OMAP3: BEAGLE: fix RTC
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 221bfda..61564a4 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -941,6 +941,9 @@ static void __init omap3_beagle_init(void)
|
||||
omap3_beagle_init_rev();
|
||||
omap3_beagle_i2c_init();
|
||||
|
||||
+ /* Ensure msecure is mux'd to be able to set the RTC. */
|
||||
+ omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH);
|
||||
+
|
||||
if (cpu_is_omap3630()) {
|
||||
gpio_buttons[0].gpio = 4;
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From bd0b2f97c48aa6aac0c6a494f1c6ba5af5de486b Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Mon, 18 Jul 2011 23:13:41 -0500
|
||||
Subject: [PATCH] omap_hsmmc: Set dto to max value of 14 to avoid SD Card timeouts
|
||||
|
||||
This fixes MMC errors due to timeouts on certain SD Cards following suggestions
|
||||
to set dto to 14 by Jason Kridner and Steven Kipisz
|
||||
|
||||
Details of the issue:
|
||||
http://talk.maemo.org/showthread.php?p=1000707#post1000707
|
||||
|
||||
This fix was originally proposed by Sukumar Ghoral of TI.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index 9646a75..7443647 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -1049,6 +1049,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
|
||||
dto = 14;
|
||||
}
|
||||
|
||||
+ /* Set dto to max value of 14 to avoid SD Card timeouts */
|
||||
+ dto = 14;
|
||||
+
|
||||
reg &= ~DTO_MASK;
|
||||
reg |= dto << DTO_SHIFT;
|
||||
OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
|
||||
--
|
||||
1.7.0.4
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 101b0aedf8152711847e2f9f347d267a3ac7f287 Mon Sep 17 00:00:00 2001
|
||||
From: Sanjeev Premi <premi@ti.com>
|
||||
Date: Fri, 24 Jun 2011 16:23:45 +0000
|
||||
Subject: [PATCH 7/7] omap3: beagle: Use GPTIMERi 1 for clockevents
|
||||
|
||||
The current selection of the GPTIMER on was result of
|
||||
a hardware issue in early versions of the Beagleboards
|
||||
(Ax and B1 thru B4). [1] [2]
|
||||
|
||||
Its been long since the hardware issue has been fixed.
|
||||
This patch uses GPTIMER 1 for all newer board revisions
|
||||
incl. Beagleboard XM.
|
||||
|
||||
[1] http://thread.gmane.org/gmane.comp.hardware.beagleboard.general/91
|
||||
[2] Errata #7 at http://elinux.org/BeagleBoard#Errata
|
||||
|
||||
Signed-off-by: Sanjeev Premi <premi@ti.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Reviewed-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 61564a4..20d5912 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -806,7 +806,10 @@ static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
omap_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(12);
|
||||
+ if (omap3_beagle_version == OMAP3BEAGLE_BOARD_AXBX)
|
||||
+ omap2_gp_clockevent_set_gptimer(12);
|
||||
+ else
|
||||
+ omap2_gp_clockevent_set_gptimer(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
3517
extras/recipes-kernel/linux/linux-omap-2.6.39/beagleboard/defconfig
Normal file
3517
extras/recipes-kernel/linux/linux-omap-2.6.39/beagleboard/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,859 @@
|
||||
From e630a914bf14bf190feaf4a2cc57f6b27c4024e1 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martin <javier.martin@vista-silicon.com>
|
||||
Date: Wed, 1 Jun 2011 17:36:48 +0200
|
||||
Subject: [PATCH 1/3] Add driver for Aptina (Micron) mt9p031 sensor.
|
||||
|
||||
Clock frequency of 57MHz used in previous version was wrong since
|
||||
when VDD_IO is 1.8V it can only support 48MHz.
|
||||
|
||||
Two new platform flags have been added:
|
||||
|
||||
- vdd_io: indicates whether the chip is powered with 1.8 or 2.8 VDD_IO.
|
||||
So that it can use the maximum allowed frequency.
|
||||
- version: monochrome and color versions of the chip have exactly
|
||||
the same ID, so the only way to select one of them is through
|
||||
platform data.
|
||||
|
||||
Internal PLL is now used to generate PIXCLK depending on VDD_IO.
|
||||
|
||||
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
|
||||
---
|
||||
drivers/media/video/Kconfig | 7 +
|
||||
drivers/media/video/Makefile | 1 +
|
||||
drivers/media/video/mt9p031.c | 763 +++++++++++++++++++++++++++++++++++++++++
|
||||
include/media/mt9p031.h | 23 ++
|
||||
4 files changed, 794 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/media/video/mt9p031.c
|
||||
create mode 100644 include/media/mt9p031.h
|
||||
|
||||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
|
||||
index 00f51dd..cb87e35 100644
|
||||
--- a/drivers/media/video/Kconfig
|
||||
+++ b/drivers/media/video/Kconfig
|
||||
@@ -329,6 +329,13 @@ config VIDEO_OV7670
|
||||
OV7670 VGA camera. It currently only works with the M88ALP01
|
||||
controller.
|
||||
|
||||
+config VIDEO_MT9P031
|
||||
+ tristate "Aptina MT9P031 support"
|
||||
+ depends on I2C && VIDEO_V4L2
|
||||
+ ---help---
|
||||
+ This is a Video4Linux2 sensor-level driver for the Aptina
|
||||
+ (Micron) mt9p031 5 Mpixel camera.
|
||||
+
|
||||
config VIDEO_MT9V011
|
||||
tristate "Micron mt9v011 sensor support"
|
||||
depends on I2C && VIDEO_V4L2
|
||||
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
|
||||
index ace5d8b..912b29b 100644
|
||||
--- a/drivers/media/video/Makefile
|
||||
+++ b/drivers/media/video/Makefile
|
||||
@@ -65,6 +65,7 @@ obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
|
||||
obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
|
||||
obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
|
||||
obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
|
||||
+obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
|
||||
obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
|
||||
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
|
||||
obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
|
||||
diff --git a/drivers/media/video/mt9p031.c b/drivers/media/video/mt9p031.c
|
||||
new file mode 100644
|
||||
index 0000000..cd830b1
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/video/mt9p031.c
|
||||
@@ -0,0 +1,763 @@
|
||||
+/*
|
||||
+ * Driver for MT9P031 CMOS Image Sensor from Aptina
|
||||
+ *
|
||||
+ * Copyright (C) 2011, Javier Martin <javier.martin@vista-silicon.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2011, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
+ *
|
||||
+ * Based on the MT9V032 driver and Bastian Hecht's code.
|
||||
+ *
|
||||
+ * 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 <linux/delay.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/log2.h>
|
||||
+#include <linux/pm.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <media/v4l2-subdev.h>
|
||||
+#include <linux/videodev2.h>
|
||||
+
|
||||
+#include <media/mt9p031.h>
|
||||
+#include <media/v4l2-chip-ident.h>
|
||||
+#include <media/v4l2-subdev.h>
|
||||
+#include <media/v4l2-device.h>
|
||||
+
|
||||
+#define MT9P031_EXTCLK_FREQ 20000000
|
||||
+
|
||||
+#define MT9P031_CHIP_VERSION 0x00
|
||||
+#define MT9P031_CHIP_VERSION_VALUE 0x1801
|
||||
+#define MT9P031_ROW_START 0x01
|
||||
+#define MT9P031_ROW_START_MIN 1
|
||||
+#define MT9P031_ROW_START_MAX 2004
|
||||
+#define MT9P031_ROW_START_DEF 54
|
||||
+#define MT9P031_COLUMN_START 0x02
|
||||
+#define MT9P031_COLUMN_START_MIN 1
|
||||
+#define MT9P031_COLUMN_START_MAX 2750
|
||||
+#define MT9P031_COLUMN_START_DEF 16
|
||||
+#define MT9P031_WINDOW_HEIGHT 0x03
|
||||
+#define MT9P031_WINDOW_HEIGHT_MIN 2
|
||||
+#define MT9P031_WINDOW_HEIGHT_MAX 2003
|
||||
+#define MT9P031_WINDOW_HEIGHT_DEF 2003
|
||||
+#define MT9P031_WINDOW_WIDTH 0x04
|
||||
+#define MT9P031_WINDOW_WIDTH_MIN 18
|
||||
+#define MT9P031_WINDOW_WIDTH_MAX 2751
|
||||
+#define MT9P031_WINDOW_WIDTH_DEF 2751
|
||||
+#define MT9P031_H_BLANKING 0x05
|
||||
+#define MT9P031_H_BLANKING_VALUE 0
|
||||
+#define MT9P031_V_BLANKING 0x06
|
||||
+#define MT9P031_V_BLANKING_VALUE 25
|
||||
+#define MT9P031_OUTPUT_CONTROL 0x07
|
||||
+#define MT9P031_OUTPUT_CONTROL_CEN 2
|
||||
+#define MT9P031_OUTPUT_CONTROL_SYN 1
|
||||
+#define MT9P031_SHUTTER_WIDTH_UPPER 0x08
|
||||
+#define MT9P031_SHUTTER_WIDTH 0x09
|
||||
+#define MT9P031_PLL_CONTROL 0x10
|
||||
+#define MT9P031_PLL_CONTROL_PWROFF 0x0050
|
||||
+#define MT9P031_PLL_CONTROL_PWRON 0x0051
|
||||
+#define MT9P031_PLL_CONTROL_USEPLL 0x0052
|
||||
+#define MT9P031_PLL_CONFIG_1 0x11
|
||||
+#define MT9P031_PLL_CONFIG_1_M_48MHZ 0x5000
|
||||
+#define MT9P031_PLL_CONFIG_1_N_48MHZ 0x05
|
||||
+#define MT9P031_PLL_CONFIG_1_M_96MHZ 0x3600
|
||||
+#define MT9P031_PLL_CONFIG_1_N_96MHZ 0x05
|
||||
+#define MT9P031_PLL_CONFIG_2 0x12
|
||||
+#define MT9P031_PLL_CONFIG_2_P1_48MHZ 5
|
||||
+#define MT9P031_PLL_CONFIG_2_P1_96MHZ 2
|
||||
+#define MT9P031_PIXEL_CLOCK_CONTROL 0x0a
|
||||
+#define MT9P031_FRAME_RESTART 0x0b
|
||||
+#define MT9P031_SHUTTER_DELAY 0x0c
|
||||
+#define MT9P031_RST 0x0d
|
||||
+#define MT9P031_RST_ENABLE 1
|
||||
+#define MT9P031_RST_DISABLE 0
|
||||
+#define MT9P031_READ_MODE_1 0x1e
|
||||
+#define MT9P031_READ_MODE_2 0x20
|
||||
+#define MT9P031_READ_MODE_2_ROW_MIR 0x8000
|
||||
+#define MT9P031_READ_MODE_2_COL_MIR 0x4000
|
||||
+#define MT9P031_ROW_ADDRESS_MODE 0x22
|
||||
+#define MT9P031_COLUMN_ADDRESS_MODE 0x23
|
||||
+#define MT9P031_GLOBAL_GAIN 0x35
|
||||
+
|
||||
+struct mt9p031 {
|
||||
+ struct v4l2_subdev subdev;
|
||||
+ struct media_pad pad;
|
||||
+ struct v4l2_rect rect; /* Sensor window */
|
||||
+ struct v4l2_mbus_framefmt format;
|
||||
+ struct mt9p031_platform_data *pdata;
|
||||
+ struct mutex power_lock; /* lock to protect power_count */
|
||||
+ int power_count;
|
||||
+ u16 xskip;
|
||||
+ u16 yskip;
|
||||
+ /* cache register values */
|
||||
+ u16 output_control;
|
||||
+};
|
||||
+
|
||||
+static struct mt9p031 *to_mt9p031(const struct i2c_client *client)
|
||||
+{
|
||||
+ return container_of(i2c_get_clientdata(client), struct mt9p031, subdev);
|
||||
+}
|
||||
+
|
||||
+static int reg_read(struct i2c_client *client, const u8 reg)
|
||||
+{
|
||||
+ s32 data = i2c_smbus_read_word_data(client, reg);
|
||||
+ return data < 0 ? data : swab16(data);
|
||||
+}
|
||||
+
|
||||
+static int reg_write(struct i2c_client *client, const u8 reg,
|
||||
+ const u16 data)
|
||||
+{
|
||||
+ return i2c_smbus_write_word_data(client, reg, swab16(data));
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_set_output_control(struct mt9p031 *mt9p031, u16 clear,
|
||||
+ u16 set)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev);
|
||||
+ u16 value = (mt9p031->output_control & ~clear) | set;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = reg_write(client, MT9P031_OUTPUT_CONTROL, value);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ mt9p031->output_control = value;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_reset(struct i2c_client *client)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = to_mt9p031(client);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Disable chip output, synchronous option update */
|
||||
+ ret = reg_write(client, MT9P031_RST, MT9P031_RST_ENABLE);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_RST, MT9P031_RST_DISABLE);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ return mt9p031_set_output_control(mt9p031,
|
||||
+ MT9P031_OUTPUT_CONTROL_CEN, 0);
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_power_on(struct mt9p031 *mt9p031)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Ensure RESET_BAR is low */
|
||||
+ if (mt9p031->pdata->reset) {
|
||||
+ mt9p031->pdata->reset(&mt9p031->subdev, 1);
|
||||
+ msleep(1);
|
||||
+ }
|
||||
+ /* Emable clock */
|
||||
+ if (mt9p031->pdata->set_xclk)
|
||||
+ mt9p031->pdata->set_xclk(&mt9p031->subdev, MT9P031_EXTCLK_FREQ);
|
||||
+ /* Now RESET_BAR must be high */
|
||||
+ if (mt9p031->pdata->reset) {
|
||||
+ mt9p031->pdata->reset(&mt9p031->subdev, 0);
|
||||
+ msleep(1);
|
||||
+ }
|
||||
+ /* soft reset */
|
||||
+ ret = mt9p031_reset(client);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&client->dev, "Failed to reset the camera\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void mt9p031_power_off(struct mt9p031 *mt9p031)
|
||||
+{
|
||||
+ if (mt9p031->pdata->reset) {
|
||||
+ mt9p031->pdata->reset(&mt9p031->subdev, 1);
|
||||
+ msleep(1);
|
||||
+ }
|
||||
+ if (mt9p031->pdata->set_xclk)
|
||||
+ mt9p031->pdata->set_xclk(&mt9p031->subdev, 0);
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_mbus_code_enum *code)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+
|
||||
+ if (code->pad || code->index)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ code->code = mt9p031->format.code;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_mbus_framefmt *mt9p031_get_pad_format(
|
||||
+ struct mt9p031 *mt9p031,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ unsigned int pad, u32 which)
|
||||
+{
|
||||
+ switch (which) {
|
||||
+ case V4L2_SUBDEV_FORMAT_TRY:
|
||||
+ return v4l2_subdev_get_try_format(fh, pad);
|
||||
+ case V4L2_SUBDEV_FORMAT_ACTIVE:
|
||||
+ return &mt9p031->format;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_rect *mt9p031_get_pad_crop(struct mt9p031 *mt9p031,
|
||||
+ struct v4l2_subdev_fh *fh, unsigned int pad, u32 which)
|
||||
+{
|
||||
+ switch (which) {
|
||||
+ case V4L2_SUBDEV_FORMAT_TRY:
|
||||
+ return v4l2_subdev_get_try_crop(fh, pad);
|
||||
+ case V4L2_SUBDEV_FORMAT_ACTIVE:
|
||||
+ return &mt9p031->rect;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_get_crop(struct v4l2_subdev *sd,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_crop *crop)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ struct v4l2_rect *rect = mt9p031_get_pad_crop(mt9p031, fh, crop->pad,
|
||||
+ crop->which);
|
||||
+ if (!rect)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ crop->rect = *rect;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static u16 mt9p031_skip_for_crop(s32 source, s32 *target, s32 max_skip)
|
||||
+{
|
||||
+ unsigned int skip;
|
||||
+
|
||||
+ if (source - source / 4 < *target) {
|
||||
+ *target = source;
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ skip = DIV_ROUND_CLOSEST(source, *target);
|
||||
+ if (skip > max_skip)
|
||||
+ skip = max_skip;
|
||||
+ *target = 2 * DIV_ROUND_UP(source, 2 * skip);
|
||||
+
|
||||
+ return skip;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_set_params(struct i2c_client *client,
|
||||
+ struct v4l2_rect *rect, u16 xskip, u16 yskip)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = to_mt9p031(client);
|
||||
+ int ret;
|
||||
+ u16 xbin, ybin;
|
||||
+ const u16 hblank = MT9P031_H_BLANKING_VALUE,
|
||||
+ vblank = MT9P031_V_BLANKING_VALUE;
|
||||
+ __s32 left;
|
||||
+
|
||||
+ /*
|
||||
+ * TODO: Attention! When implementing horizontal flipping, adjust
|
||||
+ * alignment according to R2 "Column Start" description in the datasheet
|
||||
+ */
|
||||
+ if (xskip & 1) {
|
||||
+ xbin = 1;
|
||||
+ left = rect->left & (~3);
|
||||
+ } else if (xskip & 2) {
|
||||
+ xbin = 2;
|
||||
+ left = rect->left & (~7);
|
||||
+ } else {
|
||||
+ xbin = 4;
|
||||
+ left = rect->left & (~15);
|
||||
+ }
|
||||
+ ybin = min(yskip, (u16)4);
|
||||
+
|
||||
+ /* Disable register update, reconfigure atomically */
|
||||
+ ret = mt9p031_set_output_control(mt9p031, 0,
|
||||
+ MT9P031_OUTPUT_CONTROL_SYN);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ dev_dbg(&client->dev, "skip %u:%u, rect %ux%u@%u:%u\n",
|
||||
+ xskip, yskip, rect->width, rect->height, rect->left, rect->top);
|
||||
+
|
||||
+ /* Blanking and start values - default... */
|
||||
+ ret = reg_write(client, MT9P031_H_BLANKING, hblank);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_V_BLANKING, vblank);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = reg_write(client, MT9P031_COLUMN_ADDRESS_MODE,
|
||||
+ ((xbin - 1) << 4) | (xskip - 1));
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_ROW_ADDRESS_MODE,
|
||||
+ ((ybin - 1) << 4) | (yskip - 1));
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ dev_dbg(&client->dev, "new physical left %u, top %u\n",
|
||||
+ rect->left, rect->top);
|
||||
+
|
||||
+ ret = reg_write(client, MT9P031_COLUMN_START,
|
||||
+ rect->left);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_ROW_START,
|
||||
+ rect->top);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = reg_write(client, MT9P031_WINDOW_WIDTH,
|
||||
+ rect->width - 1);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_WINDOW_HEIGHT,
|
||||
+ rect->height - 1);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Re-enable register update, commit all changes */
|
||||
+ ret = mt9p031_set_output_control(mt9p031,
|
||||
+ MT9P031_OUTPUT_CONTROL_SYN, 0);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mt9p031->xskip = xskip;
|
||||
+ mt9p031->yskip = yskip;
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_set_crop(struct v4l2_subdev *sd,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_crop *crop)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ struct v4l2_mbus_framefmt *f;
|
||||
+ struct v4l2_rect *c;
|
||||
+ struct v4l2_rect rect;
|
||||
+ u16 xskip, yskip;
|
||||
+ s32 width, height;
|
||||
+
|
||||
+ dev_dbg(mt9p031->subdev.v4l2_dev->dev, "%s(%ux%u@%u:%u : %u)\n",
|
||||
+ __func__, crop->rect.width, crop->rect.height,
|
||||
+ crop->rect.left, crop->rect.top, crop->which);
|
||||
+
|
||||
+ /*
|
||||
+ * Clamp the crop rectangle boundaries and align them to a multiple of 2
|
||||
+ * pixels.
|
||||
+ */
|
||||
+ rect.width = ALIGN(clamp(crop->rect.width,
|
||||
+ MT9P031_WINDOW_WIDTH_MIN,
|
||||
+ MT9P031_WINDOW_WIDTH_MAX), 2);
|
||||
+ rect.height = ALIGN(clamp(crop->rect.height,
|
||||
+ MT9P031_WINDOW_HEIGHT_MIN,
|
||||
+ MT9P031_WINDOW_HEIGHT_MAX), 2);
|
||||
+ rect.left = ALIGN(clamp(crop->rect.left,
|
||||
+ MT9P031_COLUMN_START_MIN,
|
||||
+ MT9P031_COLUMN_START_MAX), 2);
|
||||
+ rect.top = ALIGN(clamp(crop->rect.top,
|
||||
+ MT9P031_ROW_START_MIN,
|
||||
+ MT9P031_ROW_START_MAX), 2);
|
||||
+
|
||||
+ c = mt9p031_get_pad_crop(mt9p031, fh, crop->pad, crop->which);
|
||||
+
|
||||
+ if (rect.width != c->width || rect.height != c->height) {
|
||||
+ /*
|
||||
+ * Reset the output image size if the crop rectangle size has
|
||||
+ * been modified.
|
||||
+ */
|
||||
+ f = mt9p031_get_pad_format(mt9p031, fh, crop->pad,
|
||||
+ crop->which);
|
||||
+ width = f->width;
|
||||
+ height = f->height;
|
||||
+
|
||||
+ xskip = mt9p031_skip_for_crop(rect.width, &width, 7);
|
||||
+ yskip = mt9p031_skip_for_crop(rect.height, &height, 8);
|
||||
+ } else {
|
||||
+ xskip = mt9p031->xskip;
|
||||
+ yskip = mt9p031->yskip;
|
||||
+ f = NULL;
|
||||
+ }
|
||||
+ if (f) {
|
||||
+ f->width = width;
|
||||
+ f->height = height;
|
||||
+ }
|
||||
+
|
||||
+ *c = rect;
|
||||
+ crop->rect = rect;
|
||||
+
|
||||
+ mt9p031->xskip = xskip;
|
||||
+ mt9p031->yskip = yskip;
|
||||
+ mt9p031->rect = *c;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_get_format(struct v4l2_subdev *sd,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_format *fmt)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+
|
||||
+ fmt->format =
|
||||
+ *mt9p031_get_pad_format(mt9p031, fh, fmt->pad, fmt->which);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static u16 mt9p031_skip_for_scale(s32 *source, s32 target,
|
||||
+ s32 max_skip, s32 max)
|
||||
+{
|
||||
+ unsigned int skip;
|
||||
+
|
||||
+ if (*source - *source / 4 < target) {
|
||||
+ *source = target;
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ skip = min(max, *source + target / 2) / target;
|
||||
+ if (skip > max_skip)
|
||||
+ skip = max_skip;
|
||||
+ *source = target * skip;
|
||||
+
|
||||
+ return skip;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_set_format(struct v4l2_subdev *sd,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_format *format)
|
||||
+{
|
||||
+ struct v4l2_mbus_framefmt *__format;
|
||||
+ struct v4l2_rect *__crop, rect;
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ unsigned int width;
|
||||
+ unsigned int height;
|
||||
+ u16 xskip, yskip;
|
||||
+
|
||||
+ __crop = mt9p031_get_pad_crop(mt9p031, fh, format->pad, format->which);
|
||||
+
|
||||
+ width = clamp_t(int, ALIGN(format->format.width, 2), 2,
|
||||
+ MT9P031_WINDOW_WIDTH_MAX);
|
||||
+ height = clamp_t(int, ALIGN(format->format.height, 2), 2,
|
||||
+ MT9P031_WINDOW_HEIGHT_MAX);
|
||||
+
|
||||
+ rect.width = __crop->width;
|
||||
+ rect.height = __crop->height;
|
||||
+
|
||||
+ xskip = mt9p031_skip_for_scale(&rect.width, width, 7,
|
||||
+ MT9P031_WINDOW_WIDTH_MAX);
|
||||
+ if (rect.width + __crop->left > MT9P031_WINDOW_WIDTH_MAX)
|
||||
+ rect.left = (MT9P031_WINDOW_WIDTH_MAX - rect.width) / 2;
|
||||
+ else
|
||||
+ rect.left = __crop->left;
|
||||
+ yskip = mt9p031_skip_for_scale(&rect.height, height, 8,
|
||||
+ MT9P031_WINDOW_HEIGHT_MAX);
|
||||
+ if (rect.height + __crop->top > MT9P031_WINDOW_HEIGHT_MAX)
|
||||
+ rect.top = (MT9P031_WINDOW_HEIGHT_MAX - rect.height) / 2;
|
||||
+ else
|
||||
+ rect.top = __crop->top;
|
||||
+
|
||||
+ dev_dbg(mt9p031->subdev.v4l2_dev->dev, "%s(%ux%u : %u)\n", __func__,
|
||||
+ width, height, format->which);
|
||||
+ if (__crop)
|
||||
+ *__crop = rect;
|
||||
+
|
||||
+ __format = mt9p031_get_pad_format(mt9p031, fh, format->pad,
|
||||
+ format->which);
|
||||
+ __format->width = width;
|
||||
+ __format->height = height;
|
||||
+ format->format = *__format;
|
||||
+
|
||||
+ mt9p031->xskip = xskip;
|
||||
+ mt9p031->yskip = yskip;
|
||||
+ mt9p031->rect = *__crop;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_pll_enable(struct i2c_client *client)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = to_mt9p031(client);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONTROL, MT9P031_PLL_CONTROL_PWRON);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Always set the maximum frequency allowed by VDD_IO */
|
||||
+ if (mt9p031->pdata->vdd_io == MT9P031_VDD_IO_2V8) {
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONFIG_1,
|
||||
+ MT9P031_PLL_CONFIG_1_M_96MHZ |
|
||||
+ MT9P031_PLL_CONFIG_1_N_96MHZ);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONFIG_2,
|
||||
+ MT9P031_PLL_CONFIG_2_P1_96MHZ);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ } else {
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONFIG_1,
|
||||
+ MT9P031_PLL_CONFIG_1_M_48MHZ |
|
||||
+ MT9P031_PLL_CONFIG_1_N_48MHZ);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONFIG_2,
|
||||
+ MT9P031_PLL_CONFIG_2_P1_48MHZ);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+ mdelay(1);
|
||||
+ ret = reg_write(client, MT9P031_PLL_CONTROL,
|
||||
+ MT9P031_PLL_CONTROL_PWRON |
|
||||
+ MT9P031_PLL_CONTROL_USEPLL);
|
||||
+ mdelay(1);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static inline int mt9p031_pll_disable(struct i2c_client *client)
|
||||
+{
|
||||
+ return reg_write(client, MT9P031_PLL_CONTROL,
|
||||
+ MT9P031_PLL_CONTROL_PWROFF);
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev);
|
||||
+ struct v4l2_rect rect = mt9p031->rect;
|
||||
+ u16 xskip = mt9p031->xskip;
|
||||
+ u16 yskip = mt9p031->yskip;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (enable) {
|
||||
+ ret = mt9p031_set_params(client, &rect, xskip, yskip);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ /* Switch to master "normal" mode */
|
||||
+ ret = mt9p031_set_output_control(mt9p031, 0,
|
||||
+ MT9P031_OUTPUT_CONTROL_CEN);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = mt9p031_pll_enable(client);
|
||||
+ } else {
|
||||
+ /* Stop sensor readout */
|
||||
+ ret = mt9p031_set_output_control(mt9p031,
|
||||
+ MT9P031_OUTPUT_CONTROL_CEN, 0);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ ret = mt9p031_pll_disable(client);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_video_probe(struct i2c_client *client)
|
||||
+{
|
||||
+ s32 data;
|
||||
+
|
||||
+ /* Read out the chip version register */
|
||||
+ data = reg_read(client, MT9P031_CHIP_VERSION);
|
||||
+ if (data != MT9P031_CHIP_VERSION_VALUE) {
|
||||
+ dev_err(&client->dev,
|
||||
+ "No MT9P031 chip detected, register read %x\n", data);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ dev_info(&client->dev, "Detected a MT9P031 chip ID %x\n", data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_set_power(struct v4l2_subdev *sd, int on)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ mutex_lock(&mt9p031->power_lock);
|
||||
+
|
||||
+ /*
|
||||
+ * If the power count is modified from 0 to != 0 or from != 0 to 0,
|
||||
+ * update the power state.
|
||||
+ */
|
||||
+ if (mt9p031->power_count == !on) {
|
||||
+ if (on) {
|
||||
+ ret = mt9p031_power_on(mt9p031);
|
||||
+ if (ret) {
|
||||
+ dev_err(mt9p031->subdev.v4l2_dev->dev,
|
||||
+ "Failed to power on: %d\n", ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ } else {
|
||||
+ mt9p031_power_off(mt9p031);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Update the power count. */
|
||||
+ mt9p031->power_count += on ? 1 : -1;
|
||||
+ WARN_ON(mt9p031->power_count < 0);
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&mt9p031->power_lock);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_registered(struct v4l2_subdev *sd)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = mt9p031_set_power(&mt9p031->subdev, 1);
|
||||
+ if (ret) {
|
||||
+ dev_err(&client->dev,
|
||||
+ "Failed to power on device: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = mt9p031_video_probe(client);
|
||||
+
|
||||
+ mt9p031_set_power(&mt9p031->subdev, 0);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ struct mt9p031 *mt9p031;
|
||||
+ mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+
|
||||
+ mt9p031->rect.width = MT9P031_WINDOW_WIDTH_DEF;
|
||||
+ mt9p031->rect.height = MT9P031_WINDOW_HEIGHT_DEF;
|
||||
+ mt9p031->rect.left = MT9P031_COLUMN_START_DEF;
|
||||
+ mt9p031->rect.top = MT9P031_ROW_START_DEF;
|
||||
+
|
||||
+ if (mt9p031->pdata->version == MT9P031_MONOCHROME_VERSION)
|
||||
+ mt9p031->format.code = V4L2_MBUS_FMT_Y12_1X12;
|
||||
+ else
|
||||
+ mt9p031->format.code = V4L2_MBUS_FMT_SGRBG12_1X12;
|
||||
+
|
||||
+ mt9p031->format.width = MT9P031_WINDOW_WIDTH_DEF;
|
||||
+ mt9p031->format.height = MT9P031_WINDOW_HEIGHT_DEF;
|
||||
+ mt9p031->format.field = V4L2_FIELD_NONE;
|
||||
+ mt9p031->format.colorspace = V4L2_COLORSPACE_SRGB;
|
||||
+
|
||||
+ mt9p031->xskip = 1;
|
||||
+ mt9p031->yskip = 1;
|
||||
+ return mt9p031_set_power(sd, 1);
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ return mt9p031_set_power(sd, 0);
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_subdev_core_ops mt9p031_subdev_core_ops = {
|
||||
+ .s_power = mt9p031_set_power,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_video_ops mt9p031_subdev_video_ops = {
|
||||
+ .s_stream = mt9p031_s_stream,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_pad_ops mt9p031_subdev_pad_ops = {
|
||||
+ .enum_mbus_code = mt9p031_enum_mbus_code,
|
||||
+ .get_fmt = mt9p031_get_format,
|
||||
+ .set_fmt = mt9p031_set_format,
|
||||
+ .get_crop = mt9p031_get_crop,
|
||||
+ .set_crop = mt9p031_set_crop,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_ops mt9p031_subdev_ops = {
|
||||
+ .core = &mt9p031_subdev_core_ops,
|
||||
+ .video = &mt9p031_subdev_video_ops,
|
||||
+ .pad = &mt9p031_subdev_pad_ops,
|
||||
+};
|
||||
+
|
||||
+static const struct v4l2_subdev_internal_ops mt9p031_subdev_internal_ops = {
|
||||
+ .registered = mt9p031_registered,
|
||||
+ .open = mt9p031_open,
|
||||
+ .close = mt9p031_close,
|
||||
+};
|
||||
+
|
||||
+static int mt9p031_probe(struct i2c_client *client,
|
||||
+ const struct i2c_device_id *did)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct mt9p031 *mt9p031;
|
||||
+ struct mt9p031_platform_data *pdata = client->dev.platform_data;
|
||||
+ struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
|
||||
+
|
||||
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
|
||||
+ dev_warn(&adapter->dev,
|
||||
+ "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
+ mt9p031 = kzalloc(sizeof(struct mt9p031), GFP_KERNEL);
|
||||
+ if (!mt9p031)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mutex_init(&mt9p031->power_lock);
|
||||
+ v4l2_i2c_subdev_init(&mt9p031->subdev, client, &mt9p031_subdev_ops);
|
||||
+ mt9p031->subdev.internal_ops = &mt9p031_subdev_internal_ops;
|
||||
+
|
||||
+ mt9p031->pdata = pdata;
|
||||
+
|
||||
+ mt9p031->pad.flags = MEDIA_PAD_FL_SOURCE;
|
||||
+ ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad, 0);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ mt9p031->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9p031_remove(struct i2c_client *client)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
+ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev);
|
||||
+
|
||||
+ v4l2_device_unregister_subdev(sd);
|
||||
+ media_entity_cleanup(&sd->entity);
|
||||
+ kfree(mt9p031);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct i2c_device_id mt9p031_id[] = {
|
||||
+ { "mt9p031", 0 },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(i2c, mt9p031_id);
|
||||
+
|
||||
+static struct i2c_driver mt9p031_i2c_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "mt9p031",
|
||||
+ },
|
||||
+ .probe = mt9p031_probe,
|
||||
+ .remove = mt9p031_remove,
|
||||
+ .id_table = mt9p031_id,
|
||||
+};
|
||||
+
|
||||
+static int __init mt9p031_mod_init(void)
|
||||
+{
|
||||
+ return i2c_add_driver(&mt9p031_i2c_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit mt9p031_mod_exit(void)
|
||||
+{
|
||||
+ i2c_del_driver(&mt9p031_i2c_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(mt9p031_mod_init);
|
||||
+module_exit(mt9p031_mod_exit);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Aptina MT9P031 Camera driver");
|
||||
+MODULE_AUTHOR("Bastian Hecht <hechtb@gmail.com>");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h
|
||||
new file mode 100644
|
||||
index 0000000..27b4c75
|
||||
--- /dev/null
|
||||
+++ b/include/media/mt9p031.h
|
||||
@@ -0,0 +1,23 @@
|
||||
+#ifndef MT9P031_H
|
||||
+#define MT9P031_H
|
||||
+
|
||||
+struct v4l2_subdev;
|
||||
+
|
||||
+enum {
|
||||
+ MT9P031_COLOR_VERSION = 0,
|
||||
+ MT9P031_MONOCHROME_VERSION = 1,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
+ MT9P031_VDD_IO_1V8 = 0,
|
||||
+ MT9P031_VDD_IO_2V8 = 1,
|
||||
+};
|
||||
+
|
||||
+struct mt9p031_platform_data {
|
||||
+ int (*set_xclk)(struct v4l2_subdev *subdev, int hz);
|
||||
+ int (*reset)(struct v4l2_subdev *subdev, int active);
|
||||
+ int vdd_io; /* MT9P031_VDD_IO_1V8 or MT9P031_VDD_IO_2V8 */
|
||||
+ int version; /* MT9P031_COLOR_VERSION or MT9P031_MONOCHROME_VERSION */
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,853 @@
|
||||
From ba65e798c98e9c4d331deb2b51337964336d3f78 Mon Sep 17 00:00:00 2001
|
||||
From: Detlev Casanova <detlev.casanova@gmail.com>
|
||||
Date: Sun, 28 Nov 2010 19:07:20 +0100
|
||||
Subject: [PATCH 2/3] v4l: Add mt9v032 sensor driver
|
||||
|
||||
The MT9V032 is a parallel wide VGA sensor from Aptina (formerly Micron)
|
||||
controlled through I2C.
|
||||
|
||||
The driver creates a V4L2 subdevice. It currently supports binning and
|
||||
cropping, and the gain, auto gain, exposure, auto exposure and test
|
||||
pattern controls.
|
||||
|
||||
Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
|
||||
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
---
|
||||
drivers/media/video/Kconfig | 7 +
|
||||
drivers/media/video/Makefile | 1 +
|
||||
drivers/media/video/mt9v032.c | 773 +++++++++++++++++++++++++++++++++++++++++
|
||||
include/media/mt9v032.h | 12 +
|
||||
4 files changed, 793 insertions(+), 0 deletions(-)
|
||||
create mode 100644 drivers/media/video/mt9v032.c
|
||||
create mode 100644 include/media/mt9v032.h
|
||||
|
||||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
|
||||
index cb87e35..3a5bc57 100644
|
||||
--- a/drivers/media/video/Kconfig
|
||||
+++ b/drivers/media/video/Kconfig
|
||||
@@ -344,6 +344,13 @@ config VIDEO_MT9V011
|
||||
mt0v011 1.3 Mpixel camera. It currently only works with the
|
||||
em28xx driver.
|
||||
|
||||
+config VIDEO_MT9V032
|
||||
+ tristate "Micron MT9V032 sensor support"
|
||||
+ depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
|
||||
+ ---help---
|
||||
+ This is a Video4Linux2 sensor-level driver for the Micron
|
||||
+ MT9V032 752x480 CMOS sensor.
|
||||
+
|
||||
config VIDEO_TCM825X
|
||||
tristate "TCM825x camera sensor support"
|
||||
depends on I2C && VIDEO_V4L2
|
||||
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
|
||||
index 912b29b..6679c6a 100644
|
||||
--- a/drivers/media/video/Makefile
|
||||
+++ b/drivers/media/video/Makefile
|
||||
@@ -67,6 +67,7 @@ obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
|
||||
obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
|
||||
obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
|
||||
obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
|
||||
+obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
|
||||
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
|
||||
obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
|
||||
|
||||
diff --git a/drivers/media/video/mt9v032.c b/drivers/media/video/mt9v032.c
|
||||
new file mode 100644
|
||||
index 0000000..c64e1dc
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/video/mt9v032.c
|
||||
@@ -0,0 +1,773 @@
|
||||
+/*
|
||||
+ * Driver for MT9V032 CMOS Image Sensor from Micron
|
||||
+ *
|
||||
+ * Copyright (C) 2010, Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
+ *
|
||||
+ * Based on the MT9M001 driver,
|
||||
+ *
|
||||
+ * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
|
||||
+ *
|
||||
+ * 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 <linux/delay.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/log2.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/videodev2.h>
|
||||
+#include <linux/v4l2-mediabus.h>
|
||||
+
|
||||
+#include <media/mt9v032.h>
|
||||
+#include <media/v4l2-ctrls.h>
|
||||
+#include <media/v4l2-device.h>
|
||||
+#include <media/v4l2-subdev.h>
|
||||
+
|
||||
+#define MT9V032_PIXEL_ARRAY_HEIGHT 492
|
||||
+#define MT9V032_PIXEL_ARRAY_WIDTH 782
|
||||
+
|
||||
+#define MT9V032_CHIP_VERSION 0x00
|
||||
+#define MT9V032_CHIP_ID_REV1 0x1311
|
||||
+#define MT9V032_CHIP_ID_REV3 0x1313
|
||||
+#define MT9V032_COLUMN_START 0x01
|
||||
+#define MT9V032_COLUMN_START_MIN 1
|
||||
+#define MT9V032_COLUMN_START_DEF 1
|
||||
+#define MT9V032_COLUMN_START_MAX 752
|
||||
+#define MT9V032_ROW_START 0x02
|
||||
+#define MT9V032_ROW_START_MIN 4
|
||||
+#define MT9V032_ROW_START_DEF 5
|
||||
+#define MT9V032_ROW_START_MAX 482
|
||||
+#define MT9V032_WINDOW_HEIGHT 0x03
|
||||
+#define MT9V032_WINDOW_HEIGHT_MIN 1
|
||||
+#define MT9V032_WINDOW_HEIGHT_DEF 480
|
||||
+#define MT9V032_WINDOW_HEIGHT_MAX 480
|
||||
+#define MT9V032_WINDOW_WIDTH 0x04
|
||||
+#define MT9V032_WINDOW_WIDTH_MIN 1
|
||||
+#define MT9V032_WINDOW_WIDTH_DEF 752
|
||||
+#define MT9V032_WINDOW_WIDTH_MAX 752
|
||||
+#define MT9V032_HORIZONTAL_BLANKING 0x05
|
||||
+#define MT9V032_HORIZONTAL_BLANKING_MIN 43
|
||||
+#define MT9V032_HORIZONTAL_BLANKING_MAX 1023
|
||||
+#define MT9V032_VERTICAL_BLANKING 0x06
|
||||
+#define MT9V032_VERTICAL_BLANKING_MIN 4
|
||||
+#define MT9V032_VERTICAL_BLANKING_MAX 3000
|
||||
+#define MT9V032_CHIP_CONTROL 0x07
|
||||
+#define MT9V032_CHIP_CONTROL_MASTER_MODE (1 << 3)
|
||||
+#define MT9V032_CHIP_CONTROL_DOUT_ENABLE (1 << 7)
|
||||
+#define MT9V032_CHIP_CONTROL_SEQUENTIAL (1 << 8)
|
||||
+#define MT9V032_SHUTTER_WIDTH1 0x08
|
||||
+#define MT9V032_SHUTTER_WIDTH2 0x09
|
||||
+#define MT9V032_SHUTTER_WIDTH_CONTROL 0x0a
|
||||
+#define MT9V032_TOTAL_SHUTTER_WIDTH 0x0b
|
||||
+#define MT9V032_TOTAL_SHUTTER_WIDTH_MIN 1
|
||||
+#define MT9V032_TOTAL_SHUTTER_WIDTH_DEF 480
|
||||
+#define MT9V032_TOTAL_SHUTTER_WIDTH_MAX 32767
|
||||
+#define MT9V032_RESET 0x0c
|
||||
+#define MT9V032_READ_MODE 0x0d
|
||||
+#define MT9V032_READ_MODE_ROW_BIN_MASK (3 << 0)
|
||||
+#define MT9V032_READ_MODE_ROW_BIN_SHIFT 0
|
||||
+#define MT9V032_READ_MODE_COLUMN_BIN_MASK (3 << 2)
|
||||
+#define MT9V032_READ_MODE_COLUMN_BIN_SHIFT 2
|
||||
+#define MT9V032_READ_MODE_ROW_FLIP (1 << 4)
|
||||
+#define MT9V032_READ_MODE_COLUMN_FLIP (1 << 5)
|
||||
+#define MT9V032_READ_MODE_DARK_COLUMNS (1 << 6)
|
||||
+#define MT9V032_READ_MODE_DARK_ROWS (1 << 7)
|
||||
+#define MT9V032_PIXEL_OPERATION_MODE 0x0f
|
||||
+#define MT9V032_PIXEL_OPERATION_MODE_COLOR (1 << 2)
|
||||
+#define MT9V032_PIXEL_OPERATION_MODE_HDR (1 << 6)
|
||||
+#define MT9V032_ANALOG_GAIN 0x35
|
||||
+#define MT9V032_ANALOG_GAIN_MIN 16
|
||||
+#define MT9V032_ANALOG_GAIN_DEF 16
|
||||
+#define MT9V032_ANALOG_GAIN_MAX 64
|
||||
+#define MT9V032_MAX_ANALOG_GAIN 0x36
|
||||
+#define MT9V032_MAX_ANALOG_GAIN_MAX 127
|
||||
+#define MT9V032_FRAME_DARK_AVERAGE 0x42
|
||||
+#define MT9V032_DARK_AVG_THRESH 0x46
|
||||
+#define MT9V032_DARK_AVG_LOW_THRESH_MASK (255 << 0)
|
||||
+#define MT9V032_DARK_AVG_LOW_THRESH_SHIFT 0
|
||||
+#define MT9V032_DARK_AVG_HIGH_THRESH_MASK (255 << 8)
|
||||
+#define MT9V032_DARK_AVG_HIGH_THRESH_SHIFT 8
|
||||
+#define MT9V032_ROW_NOISE_CORR_CONTROL 0x70
|
||||
+#define MT9V032_ROW_NOISE_CORR_ENABLE (1 << 5)
|
||||
+#define MT9V032_ROW_NOISE_CORR_USE_BLK_AVG (1 << 7)
|
||||
+#define MT9V032_PIXEL_CLOCK 0x74
|
||||
+#define MT9V032_PIXEL_CLOCK_INV_LINE (1 << 0)
|
||||
+#define MT9V032_PIXEL_CLOCK_INV_FRAME (1 << 1)
|
||||
+#define MT9V032_PIXEL_CLOCK_XOR_LINE (1 << 2)
|
||||
+#define MT9V032_PIXEL_CLOCK_CONT_LINE (1 << 3)
|
||||
+#define MT9V032_PIXEL_CLOCK_INV_PXL_CLK (1 << 4)
|
||||
+#define MT9V032_TEST_PATTERN 0x7f
|
||||
+#define MT9V032_TEST_PATTERN_DATA_MASK (1023 << 0)
|
||||
+#define MT9V032_TEST_PATTERN_DATA_SHIFT 0
|
||||
+#define MT9V032_TEST_PATTERN_USE_DATA (1 << 10)
|
||||
+#define MT9V032_TEST_PATTERN_GRAY_MASK (3 << 11)
|
||||
+#define MT9V032_TEST_PATTERN_GRAY_NONE (0 << 11)
|
||||
+#define MT9V032_TEST_PATTERN_GRAY_VERTICAL (1 << 11)
|
||||
+#define MT9V032_TEST_PATTERN_GRAY_HORIZONTAL (2 << 11)
|
||||
+#define MT9V032_TEST_PATTERN_GRAY_DIAGONAL (3 << 11)
|
||||
+#define MT9V032_TEST_PATTERN_ENABLE (1 << 13)
|
||||
+#define MT9V032_TEST_PATTERN_FLIP (1 << 14)
|
||||
+#define MT9V032_AEC_AGC_ENABLE 0xaf
|
||||
+#define MT9V032_AEC_ENABLE (1 << 0)
|
||||
+#define MT9V032_AGC_ENABLE (1 << 1)
|
||||
+#define MT9V032_THERMAL_INFO 0xc1
|
||||
+
|
||||
+struct mt9v032 {
|
||||
+ struct v4l2_subdev subdev;
|
||||
+ struct media_pad pad;
|
||||
+
|
||||
+ struct v4l2_mbus_framefmt format;
|
||||
+ struct v4l2_rect crop;
|
||||
+
|
||||
+ struct v4l2_ctrl_handler ctrls;
|
||||
+
|
||||
+ struct mutex power_lock;
|
||||
+ int power_count;
|
||||
+
|
||||
+ struct mt9v032_platform_data *pdata;
|
||||
+ u16 chip_control;
|
||||
+ u16 aec_agc;
|
||||
+};
|
||||
+
|
||||
+static struct mt9v032 *to_mt9v032(struct v4l2_subdev *sd)
|
||||
+{
|
||||
+ return container_of(sd, struct mt9v032, subdev);
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_read(struct i2c_client *client, const u8 reg)
|
||||
+{
|
||||
+ s32 data = i2c_smbus_read_word_data(client, reg);
|
||||
+ dev_dbg(&client->dev, "%s: read 0x%04x from 0x%02x\n", __func__,
|
||||
+ swab16(data), reg);
|
||||
+ return data < 0 ? data : swab16(data);
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_write(struct i2c_client *client, const u8 reg,
|
||||
+ const u16 data)
|
||||
+{
|
||||
+ dev_dbg(&client->dev, "%s: writing 0x%04x to 0x%02x\n", __func__,
|
||||
+ data, reg);
|
||||
+ return i2c_smbus_write_word_data(client, reg, swab16(data));
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_set_chip_control(struct mt9v032 *mt9v032, u16 clear, u16 set)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev);
|
||||
+ u16 value = (mt9v032->chip_control & ~clear) | set;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_CHIP_CONTROL, value);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mt9v032->chip_control = value;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+mt9v032_update_aec_agc(struct mt9v032 *mt9v032, u16 which, int enable)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev);
|
||||
+ u16 value = mt9v032->aec_agc;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (enable)
|
||||
+ value |= which;
|
||||
+ else
|
||||
+ value &= ~which;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_AEC_AGC_ENABLE, value);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mt9v032->aec_agc = value;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_power_on(struct mt9v032 *mt9v032)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (mt9v032->pdata->set_clock) {
|
||||
+ mt9v032->pdata->set_clock(&mt9v032->subdev, 25000000);
|
||||
+ udelay(1);
|
||||
+ }
|
||||
+
|
||||
+ /* Reset the chip and stop data read out */
|
||||
+ ret = mt9v032_write(client, MT9V032_RESET, 1);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_RESET, 0);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return mt9v032_write(client, MT9V032_CHIP_CONTROL, 0);
|
||||
+}
|
||||
+
|
||||
+static void mt9v032_power_off(struct mt9v032 *mt9v032)
|
||||
+{
|
||||
+ if (mt9v032->pdata->set_clock)
|
||||
+ mt9v032->pdata->set_clock(&mt9v032->subdev, 0);
|
||||
+}
|
||||
+
|
||||
+static int __mt9v032_set_power(struct mt9v032 *mt9v032, bool on)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!on) {
|
||||
+ mt9v032_power_off(mt9v032);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ret = mt9v032_power_on(mt9v032);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Configure the pixel clock polarity */
|
||||
+ if (mt9v032->pdata && mt9v032->pdata->clk_pol) {
|
||||
+ ret = mt9v032_write(client, MT9V032_PIXEL_CLOCK,
|
||||
+ MT9V032_PIXEL_CLOCK_INV_PXL_CLK);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Disable the noise correction algorithm and restore the controls. */
|
||||
+ ret = mt9v032_write(client, MT9V032_ROW_NOISE_CORR_CONTROL, 0);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return v4l2_ctrl_handler_setup(&mt9v032->ctrls);
|
||||
+}
|
||||
+
|
||||
+/* -----------------------------------------------------------------------------
|
||||
+ * V4L2 subdev video operations
|
||||
+ */
|
||||
+
|
||||
+static struct v4l2_mbus_framefmt *
|
||||
+__mt9v032_get_pad_format(struct mt9v032 *mt9v032, struct v4l2_subdev_fh *fh,
|
||||
+ unsigned int pad, enum v4l2_subdev_format_whence which)
|
||||
+{
|
||||
+ switch (which) {
|
||||
+ case V4L2_SUBDEV_FORMAT_TRY:
|
||||
+ return v4l2_subdev_get_try_format(fh, pad);
|
||||
+ case V4L2_SUBDEV_FORMAT_ACTIVE:
|
||||
+ return &mt9v032->format;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_rect *
|
||||
+__mt9v032_get_pad_crop(struct mt9v032 *mt9v032, struct v4l2_subdev_fh *fh,
|
||||
+ unsigned int pad, enum v4l2_subdev_format_whence which)
|
||||
+{
|
||||
+ switch (which) {
|
||||
+ case V4L2_SUBDEV_FORMAT_TRY:
|
||||
+ return v4l2_subdev_get_try_crop(fh, pad);
|
||||
+ case V4L2_SUBDEV_FORMAT_ACTIVE:
|
||||
+ return &mt9v032->crop;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_s_stream(struct v4l2_subdev *subdev, int enable)
|
||||
+{
|
||||
+ const u16 mode = MT9V032_CHIP_CONTROL_MASTER_MODE
|
||||
+ | MT9V032_CHIP_CONTROL_DOUT_ENABLE
|
||||
+ | MT9V032_CHIP_CONTROL_SEQUENTIAL;
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(subdev);
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+ struct v4l2_mbus_framefmt *format = &mt9v032->format;
|
||||
+ struct v4l2_rect *crop = &mt9v032->crop;
|
||||
+ unsigned int hratio;
|
||||
+ unsigned int vratio;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!enable)
|
||||
+ return mt9v032_set_chip_control(mt9v032, mode, 0);
|
||||
+
|
||||
+ /* Configure the window size and row/column bin */
|
||||
+ hratio = DIV_ROUND_CLOSEST(crop->width, format->width);
|
||||
+ vratio = DIV_ROUND_CLOSEST(crop->height, format->height);
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_READ_MODE,
|
||||
+ (hratio - 1) << MT9V032_READ_MODE_ROW_BIN_SHIFT |
|
||||
+ (vratio - 1) << MT9V032_READ_MODE_COLUMN_BIN_SHIFT);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_COLUMN_START, crop->left);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_ROW_START, crop->top);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_WINDOW_WIDTH, crop->width);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_WINDOW_HEIGHT, crop->height);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = mt9v032_write(client, MT9V032_HORIZONTAL_BLANKING,
|
||||
+ max(43, 660 - crop->width));
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Switch to master "normal" mode */
|
||||
+ return mt9v032_set_chip_control(mt9v032, 0, mode);
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_enum_mbus_code(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_mbus_code_enum *code)
|
||||
+{
|
||||
+ if (code->index > 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ code->code = V4L2_MBUS_FMT_SGRBG10_1X10;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_enum_frame_size(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_frame_size_enum *fse)
|
||||
+{
|
||||
+ if (fse->index >= 8 || fse->code != V4L2_MBUS_FMT_SGRBG10_1X10)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ fse->min_width = MT9V032_WINDOW_WIDTH_DEF / fse->index;
|
||||
+ fse->max_width = fse->min_width;
|
||||
+ fse->min_height = MT9V032_WINDOW_HEIGHT_DEF / fse->index;
|
||||
+ fse->max_height = fse->min_height;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_get_format(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_format *format)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+
|
||||
+ format->format = *__mt9v032_get_pad_format(mt9v032, fh, format->pad,
|
||||
+ format->which);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_set_format(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_format *format)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+ struct v4l2_mbus_framefmt *__format;
|
||||
+ struct v4l2_rect *__crop;
|
||||
+ unsigned int width;
|
||||
+ unsigned int height;
|
||||
+ unsigned int hratio;
|
||||
+ unsigned int vratio;
|
||||
+
|
||||
+ __crop = __mt9v032_get_pad_crop(mt9v032, fh, format->pad,
|
||||
+ format->which);
|
||||
+
|
||||
+ /* Clamp the width and height to avoid dividing by zero. */
|
||||
+ width = clamp_t(unsigned int, ALIGN(format->format.width, 2),
|
||||
+ max(__crop->width / 8, MT9V032_WINDOW_WIDTH_MIN),
|
||||
+ __crop->width);
|
||||
+ height = clamp_t(unsigned int, ALIGN(format->format.height, 2),
|
||||
+ max(__crop->height / 8, MT9V032_WINDOW_HEIGHT_MIN),
|
||||
+ __crop->height);
|
||||
+
|
||||
+ hratio = DIV_ROUND_CLOSEST(__crop->width, width);
|
||||
+ vratio = DIV_ROUND_CLOSEST(__crop->height, height);
|
||||
+
|
||||
+ __format = __mt9v032_get_pad_format(mt9v032, fh, format->pad,
|
||||
+ format->which);
|
||||
+ __format->width = __crop->width / hratio;
|
||||
+ __format->height = __crop->height / vratio;
|
||||
+
|
||||
+ format->format = *__format;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_get_crop(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_crop *crop)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+
|
||||
+ crop->rect = *__mt9v032_get_pad_crop(mt9v032, fh, crop->pad,
|
||||
+ crop->which);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_set_crop(struct v4l2_subdev *subdev,
|
||||
+ struct v4l2_subdev_fh *fh,
|
||||
+ struct v4l2_subdev_crop *crop)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+ struct v4l2_mbus_framefmt *__format;
|
||||
+ struct v4l2_rect *__crop;
|
||||
+ struct v4l2_rect rect;
|
||||
+
|
||||
+ /* Clamp the crop rectangle boundaries and align them to a non multiple
|
||||
+ * of 2 pixels to ensure a GRBG Bayer pattern.
|
||||
+ */
|
||||
+ rect.left = clamp(ALIGN(crop->rect.left + 1, 2) - 1,
|
||||
+ MT9V032_COLUMN_START_MIN,
|
||||
+ MT9V032_COLUMN_START_MAX);
|
||||
+ rect.top = clamp(ALIGN(crop->rect.top + 1, 2) - 1,
|
||||
+ MT9V032_ROW_START_MIN,
|
||||
+ MT9V032_ROW_START_MAX);
|
||||
+ rect.width = clamp(ALIGN(crop->rect.width, 2),
|
||||
+ MT9V032_WINDOW_WIDTH_MIN,
|
||||
+ MT9V032_WINDOW_WIDTH_MAX);
|
||||
+ rect.height = clamp(ALIGN(crop->rect.height, 2),
|
||||
+ MT9V032_WINDOW_HEIGHT_MIN,
|
||||
+ MT9V032_WINDOW_HEIGHT_MAX);
|
||||
+
|
||||
+ rect.width = min(rect.width, MT9V032_PIXEL_ARRAY_WIDTH - rect.left);
|
||||
+ rect.height = min(rect.height, MT9V032_PIXEL_ARRAY_HEIGHT - rect.top);
|
||||
+
|
||||
+ __crop = __mt9v032_get_pad_crop(mt9v032, fh, crop->pad, crop->which);
|
||||
+
|
||||
+ if (rect.width != __crop->width || rect.height != __crop->height) {
|
||||
+ /* Reset the output image size if the crop rectangle size has
|
||||
+ * been modified.
|
||||
+ */
|
||||
+ __format = __mt9v032_get_pad_format(mt9v032, fh, crop->pad,
|
||||
+ crop->which);
|
||||
+ __format->width = rect.width;
|
||||
+ __format->height = rect.height;
|
||||
+ }
|
||||
+
|
||||
+ *__crop = rect;
|
||||
+ crop->rect = rect;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* -----------------------------------------------------------------------------
|
||||
+ * V4L2 subdev control operations
|
||||
+ */
|
||||
+
|
||||
+#define V4L2_CID_TEST_PATTERN (V4L2_CID_USER_BASE | 0x1001)
|
||||
+
|
||||
+static int mt9v032_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 =
|
||||
+ container_of(ctrl->handler, struct mt9v032, ctrls);
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev);
|
||||
+ u16 data;
|
||||
+
|
||||
+ switch (ctrl->id) {
|
||||
+ case V4L2_CID_AUTOGAIN:
|
||||
+ return mt9v032_update_aec_agc(mt9v032, MT9V032_AGC_ENABLE,
|
||||
+ ctrl->val);
|
||||
+
|
||||
+ case V4L2_CID_GAIN:
|
||||
+ return mt9v032_write(client, MT9V032_ANALOG_GAIN, ctrl->val);
|
||||
+
|
||||
+ case V4L2_CID_EXPOSURE_AUTO:
|
||||
+ return mt9v032_update_aec_agc(mt9v032, MT9V032_AEC_ENABLE,
|
||||
+ ctrl->val);
|
||||
+
|
||||
+ case V4L2_CID_EXPOSURE:
|
||||
+ return mt9v032_write(client, MT9V032_TOTAL_SHUTTER_WIDTH,
|
||||
+ ctrl->val);
|
||||
+
|
||||
+ case V4L2_CID_TEST_PATTERN:
|
||||
+ switch (ctrl->val) {
|
||||
+ case 0:
|
||||
+ data = 0;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ data = MT9V032_TEST_PATTERN_GRAY_VERTICAL
|
||||
+ | MT9V032_TEST_PATTERN_ENABLE;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ data = MT9V032_TEST_PATTERN_GRAY_HORIZONTAL
|
||||
+ | MT9V032_TEST_PATTERN_ENABLE;
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ data = MT9V032_TEST_PATTERN_GRAY_DIAGONAL
|
||||
+ | MT9V032_TEST_PATTERN_ENABLE;
|
||||
+ break;
|
||||
+ default:
|
||||
+ data = (ctrl->val << MT9V032_TEST_PATTERN_DATA_SHIFT)
|
||||
+ | MT9V032_TEST_PATTERN_USE_DATA
|
||||
+ | MT9V032_TEST_PATTERN_ENABLE
|
||||
+ | MT9V032_TEST_PATTERN_FLIP;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return mt9v032_write(client, MT9V032_TEST_PATTERN, data);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_ctrl_ops mt9v032_ctrl_ops = {
|
||||
+ .s_ctrl = mt9v032_s_ctrl,
|
||||
+};
|
||||
+
|
||||
+static const struct v4l2_ctrl_config mt9v032_ctrls[] = {
|
||||
+ {
|
||||
+ .ops = &mt9v032_ctrl_ops,
|
||||
+ .id = V4L2_CID_TEST_PATTERN,
|
||||
+ .type = V4L2_CTRL_TYPE_INTEGER,
|
||||
+ .name = "Test pattern",
|
||||
+ .min = 0,
|
||||
+ .max = 1023,
|
||||
+ .step = 1,
|
||||
+ .def = 0,
|
||||
+ .flags = 0,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+/* -----------------------------------------------------------------------------
|
||||
+ * V4L2 subdev core operations
|
||||
+ */
|
||||
+
|
||||
+static int mt9v032_set_power(struct v4l2_subdev *subdev, int on)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ mutex_lock(&mt9v032->power_lock);
|
||||
+
|
||||
+ /* If the power count is modified from 0 to != 0 or from != 0 to 0,
|
||||
+ * update the power state.
|
||||
+ */
|
||||
+ if (mt9v032->power_count == !on) {
|
||||
+ ret = __mt9v032_set_power(mt9v032, !!on);
|
||||
+ if (ret < 0)
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ /* Update the power count. */
|
||||
+ mt9v032->power_count += on ? 1 : -1;
|
||||
+ WARN_ON(mt9v032->power_count < 0);
|
||||
+
|
||||
+done:
|
||||
+ mutex_unlock(&mt9v032->power_lock);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* -----------------------------------------------------------------------------
|
||||
+ * V4L2 subdev internal operations
|
||||
+ */
|
||||
+
|
||||
+static int mt9v032_registered(struct v4l2_subdev *subdev)
|
||||
+{
|
||||
+ struct i2c_client *client = v4l2_get_subdevdata(subdev);
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+ s32 data;
|
||||
+ int ret;
|
||||
+
|
||||
+ dev_info(&client->dev, "Probing MT9V032 at address 0x%02x\n",
|
||||
+ client->addr);
|
||||
+
|
||||
+ ret = mt9v032_power_on(mt9v032);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&client->dev, "MT9V032 power up failed\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Read and check the sensor version */
|
||||
+ data = mt9v032_read(client, MT9V032_CHIP_VERSION);
|
||||
+ if (data != MT9V032_CHIP_ID_REV1 && data != MT9V032_CHIP_ID_REV3) {
|
||||
+ dev_err(&client->dev, "MT9V032 not detected, wrong version "
|
||||
+ "0x%04x\n", data);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ mt9v032_power_off(mt9v032);
|
||||
+
|
||||
+ dev_info(&client->dev, "MT9V032 detected at address 0x%02x\n",
|
||||
+ client->addr);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ struct v4l2_mbus_framefmt *format;
|
||||
+ struct v4l2_rect *crop;
|
||||
+
|
||||
+ crop = v4l2_subdev_get_try_crop(fh, 0);
|
||||
+ crop->left = MT9V032_COLUMN_START_DEF;
|
||||
+ crop->top = MT9V032_ROW_START_DEF;
|
||||
+ crop->width = MT9V032_WINDOW_WIDTH_DEF;
|
||||
+ crop->height = MT9V032_WINDOW_HEIGHT_DEF;
|
||||
+
|
||||
+ format = v4l2_subdev_get_try_format(fh, 0);
|
||||
+ format->code = V4L2_MBUS_FMT_SGRBG10_1X10;
|
||||
+ format->width = MT9V032_WINDOW_WIDTH_DEF;
|
||||
+ format->height = MT9V032_WINDOW_HEIGHT_DEF;
|
||||
+ format->field = V4L2_FIELD_NONE;
|
||||
+ format->colorspace = V4L2_COLORSPACE_SRGB;
|
||||
+
|
||||
+ return mt9v032_set_power(subdev, 1);
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ return mt9v032_set_power(subdev, 0);
|
||||
+}
|
||||
+
|
||||
+static struct v4l2_subdev_core_ops mt9v032_subdev_core_ops = {
|
||||
+ .s_power = mt9v032_set_power,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_video_ops mt9v032_subdev_video_ops = {
|
||||
+ .s_stream = mt9v032_s_stream,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_pad_ops mt9v032_subdev_pad_ops = {
|
||||
+ .enum_mbus_code = mt9v032_enum_mbus_code,
|
||||
+ .enum_frame_size = mt9v032_enum_frame_size,
|
||||
+ .get_fmt = mt9v032_get_format,
|
||||
+ .set_fmt = mt9v032_set_format,
|
||||
+ .get_crop = mt9v032_get_crop,
|
||||
+ .set_crop = mt9v032_set_crop,
|
||||
+};
|
||||
+
|
||||
+static struct v4l2_subdev_ops mt9v032_subdev_ops = {
|
||||
+ .core = &mt9v032_subdev_core_ops,
|
||||
+ .video = &mt9v032_subdev_video_ops,
|
||||
+ .pad = &mt9v032_subdev_pad_ops,
|
||||
+};
|
||||
+
|
||||
+static const struct v4l2_subdev_internal_ops mt9v032_subdev_internal_ops = {
|
||||
+ .registered = mt9v032_registered,
|
||||
+ .open = mt9v032_open,
|
||||
+ .close = mt9v032_close,
|
||||
+};
|
||||
+
|
||||
+/* -----------------------------------------------------------------------------
|
||||
+ * Driver initialization and probing
|
||||
+ */
|
||||
+
|
||||
+static int mt9v032_probe(struct i2c_client *client,
|
||||
+ const struct i2c_device_id *did)
|
||||
+{
|
||||
+ struct mt9v032 *mt9v032;
|
||||
+ unsigned int i;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!i2c_check_functionality(client->adapter,
|
||||
+ I2C_FUNC_SMBUS_WORD_DATA)) {
|
||||
+ dev_warn(&client->adapter->dev,
|
||||
+ "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
+ mt9v032 = kzalloc(sizeof(*mt9v032), GFP_KERNEL);
|
||||
+ if (!mt9v032)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mutex_init(&mt9v032->power_lock);
|
||||
+ mt9v032->pdata = client->dev.platform_data;
|
||||
+
|
||||
+ v4l2_ctrl_handler_init(&mt9v032->ctrls, ARRAY_SIZE(mt9v032_ctrls) + 4);
|
||||
+
|
||||
+ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops,
|
||||
+ V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
|
||||
+ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops,
|
||||
+ V4L2_CID_GAIN, MT9V032_ANALOG_GAIN_MIN,
|
||||
+ MT9V032_ANALOG_GAIN_MAX, 1, MT9V032_ANALOG_GAIN_DEF);
|
||||
+ v4l2_ctrl_new_std_menu(&mt9v032->ctrls, &mt9v032_ctrl_ops,
|
||||
+ V4L2_CID_EXPOSURE_AUTO, V4L2_EXPOSURE_MANUAL, 0,
|
||||
+ V4L2_EXPOSURE_AUTO);
|
||||
+ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops,
|
||||
+ V4L2_CID_EXPOSURE, MT9V032_TOTAL_SHUTTER_WIDTH_MIN,
|
||||
+ MT9V032_TOTAL_SHUTTER_WIDTH_MAX, 1,
|
||||
+ MT9V032_TOTAL_SHUTTER_WIDTH_DEF);
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(mt9v032_ctrls); ++i)
|
||||
+ v4l2_ctrl_new_custom(&mt9v032->ctrls, &mt9v032_ctrls[i], NULL);
|
||||
+
|
||||
+ mt9v032->subdev.ctrl_handler = &mt9v032->ctrls;
|
||||
+
|
||||
+ if (mt9v032->ctrls.error)
|
||||
+ printk(KERN_INFO "%s: control initialization error %d\n",
|
||||
+ __func__, mt9v032->ctrls.error);
|
||||
+
|
||||
+ mt9v032->crop.left = MT9V032_COLUMN_START_DEF;
|
||||
+ mt9v032->crop.top = MT9V032_ROW_START_DEF;
|
||||
+ mt9v032->crop.width = MT9V032_WINDOW_WIDTH_DEF;
|
||||
+ mt9v032->crop.height = MT9V032_WINDOW_HEIGHT_DEF;
|
||||
+
|
||||
+ mt9v032->format.code = V4L2_MBUS_FMT_SGRBG10_1X10;
|
||||
+ mt9v032->format.width = MT9V032_WINDOW_WIDTH_DEF;
|
||||
+ mt9v032->format.height = MT9V032_WINDOW_HEIGHT_DEF;
|
||||
+ mt9v032->format.field = V4L2_FIELD_NONE;
|
||||
+ mt9v032->format.colorspace = V4L2_COLORSPACE_SRGB;
|
||||
+
|
||||
+ mt9v032->aec_agc = MT9V032_AEC_ENABLE | MT9V032_AGC_ENABLE;
|
||||
+
|
||||
+ v4l2_i2c_subdev_init(&mt9v032->subdev, client, &mt9v032_subdev_ops);
|
||||
+ mt9v032->subdev.internal_ops = &mt9v032_subdev_internal_ops;
|
||||
+ mt9v032->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
+
|
||||
+ mt9v032->pad.flags = MEDIA_PAD_FL_SOURCE;
|
||||
+ ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0);
|
||||
+ if (ret < 0)
|
||||
+ kfree(mt9v032);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mt9v032_remove(struct i2c_client *client)
|
||||
+{
|
||||
+ struct v4l2_subdev *subdev = i2c_get_clientdata(client);
|
||||
+ struct mt9v032 *mt9v032 = to_mt9v032(subdev);
|
||||
+
|
||||
+ v4l2_device_unregister_subdev(subdev);
|
||||
+ media_entity_cleanup(&subdev->entity);
|
||||
+ kfree(mt9v032);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct i2c_device_id mt9v032_id[] = {
|
||||
+ { "mt9v032", 0 },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(i2c, mt9v032_id);
|
||||
+
|
||||
+static struct i2c_driver mt9v032_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "mt9v032",
|
||||
+ },
|
||||
+ .probe = mt9v032_probe,
|
||||
+ .remove = mt9v032_remove,
|
||||
+ .id_table = mt9v032_id,
|
||||
+};
|
||||
+
|
||||
+static int __init mt9v032_init(void)
|
||||
+{
|
||||
+ return i2c_add_driver(&mt9v032_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit mt9v032_exit(void)
|
||||
+{
|
||||
+ i2c_del_driver(&mt9v032_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(mt9v032_init);
|
||||
+module_exit(mt9v032_exit);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Aptina MT9V032 Camera driver");
|
||||
+MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff --git a/include/media/mt9v032.h b/include/media/mt9v032.h
|
||||
new file mode 100644
|
||||
index 0000000..5e27f9b
|
||||
--- /dev/null
|
||||
+++ b/include/media/mt9v032.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef _MEDIA_MT9V032_H
|
||||
+#define _MEDIA_MT9V032_H
|
||||
+
|
||||
+struct v4l2_subdev;
|
||||
+
|
||||
+struct mt9v032_platform_data {
|
||||
+ unsigned int clk_pol:1;
|
||||
+
|
||||
+ void (*set_clock)(struct v4l2_subdev *subdev, unsigned int rate);
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
From f662a8a2b9794121568903f5cc969e50eb151892 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martin <javier.martin@vista-silicon.com>
|
||||
Date: Mon, 30 May 2011 10:37:17 +0200
|
||||
Subject: [PATCH 3/3] Add support for mt9p031 (LI-5M03 module) in Beagleboard xM.
|
||||
|
||||
Since isp clocks have not been exposed yet, this patch
|
||||
includes a temporal solution for testing mt9p031 driver
|
||||
in Beagleboard xM.
|
||||
|
||||
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 1 +
|
||||
arch/arm/mach-omap2/board-omap3beagle-camera.c | 95 ++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 +
|
||||
3 files changed, 101 insertions(+), 0 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index 512b152..05cd983 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -179,6 +179,7 @@ obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \
|
||||
hsmmc.o
|
||||
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
|
||||
obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \
|
||||
+ board-omap3beagle-camera.o \
|
||||
hsmmc.o
|
||||
obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o \
|
||||
hsmmc.o
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
new file mode 100644
|
||||
index 0000000..2632557
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c
|
||||
@@ -0,0 +1,95 @@
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/regulator/machine.h>
|
||||
+
|
||||
+#include <plat/i2c.h>
|
||||
+
|
||||
+#include <media/mt9p031.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+#include "devices.h"
|
||||
+#include "../../../drivers/media/video/omap3isp/isp.h"
|
||||
+
|
||||
+#define MT9P031_RESET_GPIO 98
|
||||
+#define MT9P031_XCLK ISP_XCLK_A
|
||||
+
|
||||
+static struct regulator *reg_1v8, *reg_2v8;
|
||||
+
|
||||
+static int beagle_cam_set_xclk(struct v4l2_subdev *subdev, int hz)
|
||||
+{
|
||||
+ struct isp_device *isp = v4l2_dev_to_isp_device(subdev->v4l2_dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = isp->platform_cb.set_xclk(isp, hz, MT9P031_XCLK);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int beagle_cam_reset(struct v4l2_subdev *subdev, int active)
|
||||
+{
|
||||
+ /* Set RESET_BAR to !active */
|
||||
+ gpio_set_value(MT9P031_RESET_GPIO, !active);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct mt9p031_platform_data beagle_mt9p031_platform_data = {
|
||||
+ .set_xclk = beagle_cam_set_xclk,
|
||||
+ .reset = beagle_cam_reset,
|
||||
+ .vdd_io = MT9P031_VDD_IO_1V8,
|
||||
+ .version = MT9P031_COLOR_VERSION,
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info mt9p031_camera_i2c_device = {
|
||||
+ I2C_BOARD_INFO("mt9p031", 0x48),
|
||||
+ .platform_data = &beagle_mt9p031_platform_data,
|
||||
+};
|
||||
+
|
||||
+static struct isp_subdev_i2c_board_info mt9p031_camera_subdevs[] = {
|
||||
+ {
|
||||
+ .board_info = &mt9p031_camera_i2c_device,
|
||||
+ .i2c_adapter_id = 2,
|
||||
+ },
|
||||
+ { NULL, 0, },
|
||||
+};
|
||||
+
|
||||
+static struct isp_v4l2_subdevs_group beagle_camera_subdevs[] = {
|
||||
+ {
|
||||
+ .subdevs = mt9p031_camera_subdevs,
|
||||
+ .interface = ISP_INTERFACE_PARALLEL,
|
||||
+ .bus = {
|
||||
+ .parallel = {
|
||||
+ .data_lane_shift = 0,
|
||||
+ .clk_pol = 1,
|
||||
+ .bridge = ISPCTRL_PAR_BRIDGE_DISABLE,
|
||||
+ }
|
||||
+ },
|
||||
+ },
|
||||
+ { },
|
||||
+};
|
||||
+
|
||||
+static struct isp_platform_data beagle_isp_platform_data = {
|
||||
+ .subdevs = beagle_camera_subdevs,
|
||||
+};
|
||||
+
|
||||
+static int __init beagle_camera_init(void)
|
||||
+{
|
||||
+ if (!machine_is_omap3_beagle() || !cpu_is_omap3630())
|
||||
+ return 0;
|
||||
+
|
||||
+ reg_1v8 = regulator_get(NULL, "cam_1v8");
|
||||
+ if (IS_ERR(reg_1v8))
|
||||
+ pr_err("%s: cannot get cam_1v8 regulator\n", __func__);
|
||||
+ else
|
||||
+ regulator_enable(reg_1v8);
|
||||
+
|
||||
+ reg_2v8 = regulator_get(NULL, "cam_2v8");
|
||||
+ if (IS_ERR(reg_2v8))
|
||||
+ pr_err("%s: cannot get cam_2v8 regulator\n", __func__);
|
||||
+ else
|
||||
+ regulator_enable(reg_2v8);
|
||||
+
|
||||
+ omap_register_i2c_bus(2, 100, NULL, 0);
|
||||
+ gpio_request(MT9P031_RESET_GPIO, "cam_rst");
|
||||
+ gpio_direction_output(MT9P031_RESET_GPIO, 0);
|
||||
+ omap3_init_camera(&beagle_isp_platform_data);
|
||||
+ return 0;
|
||||
+}
|
||||
+late_initcall(beagle_camera_init);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 221bfda..dd6e31f 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -25,12 +25,16 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/opp.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/videodev2.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mmc/host.h>
|
||||
|
||||
+#include <linux/gpio.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
|
||||
@@ -48,6 +52,7 @@
|
||||
#include <plat/nand.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/omap_device.h>
|
||||
+#include <plat/i2c.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 46be90d202c36db19e27c2991cbff401c6c3ee81 Mon Sep 17 00:00:00 2001
|
||||
From: Keshava Munegowda <Keshava_mgowda@ti.com>
|
||||
Date: Mon, 16 May 2011 14:24:58 +0530
|
||||
Subject: [PATCH 01/13] mfd: Fix omap usbhs crash when rmmoding ehci or ohci
|
||||
|
||||
The disabling of clocks and freeing GPIO are changed
|
||||
to fix the occurrence of the crash of rmmod of ehci and ohci
|
||||
drivers. The GPIOs should be freed after the spin locks are
|
||||
unlocked.
|
||||
|
||||
Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
|
||||
Acked-by: Felipe Balbi <balbi@ti.com>
|
||||
Cc: stable@kernel.org
|
||||
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||
---
|
||||
drivers/mfd/omap-usb-host.c | 27 +++++++++++++++++++--------
|
||||
1 files changed, 19 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
|
||||
index 3ab9ffa..55c5d47 100644
|
||||
--- a/drivers/mfd/omap-usb-host.c
|
||||
+++ b/drivers/mfd/omap-usb-host.c
|
||||
@@ -994,22 +994,33 @@ static void usbhs_disable(struct device *dev)
|
||||
dev_dbg(dev, "operation timed out\n");
|
||||
}
|
||||
|
||||
- if (pdata->ehci_data->phy_reset) {
|
||||
- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
|
||||
- gpio_free(pdata->ehci_data->reset_gpio_port[0]);
|
||||
-
|
||||
- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
|
||||
- gpio_free(pdata->ehci_data->reset_gpio_port[1]);
|
||||
+ if (is_omap_usbhs_rev2(omap)) {
|
||||
+ if (is_ehci_tll_mode(pdata->port_mode[0]))
|
||||
+ clk_enable(omap->usbtll_p1_fck);
|
||||
+ if (is_ehci_tll_mode(pdata->port_mode[1]))
|
||||
+ clk_enable(omap->usbtll_p2_fck);
|
||||
+ clk_disable(omap->utmi_p2_fck);
|
||||
+ clk_disable(omap->utmi_p1_fck);
|
||||
}
|
||||
|
||||
- clk_disable(omap->utmi_p2_fck);
|
||||
- clk_disable(omap->utmi_p1_fck);
|
||||
clk_disable(omap->usbtll_ick);
|
||||
clk_disable(omap->usbtll_fck);
|
||||
clk_disable(omap->usbhost_fs_fck);
|
||||
clk_disable(omap->usbhost_hs_fck);
|
||||
clk_disable(omap->usbhost_ick);
|
||||
|
||||
+ /* The gpio_free migh sleep; so unlock the spinlock */
|
||||
+ spin_unlock_irqrestore(&omap->lock, flags);
|
||||
+
|
||||
+ if (pdata->ehci_data->phy_reset) {
|
||||
+ if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
|
||||
+ gpio_free(pdata->ehci_data->reset_gpio_port[0]);
|
||||
+
|
||||
+ if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
|
||||
+ gpio_free(pdata->ehci_data->reset_gpio_port[1]);
|
||||
+ }
|
||||
+ return;
|
||||
+
|
||||
end_disble:
|
||||
spin_unlock_irqrestore(&omap->lock, flags);
|
||||
}
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 89a903aca8fda3dcf1a6f9a424247e772afdd44e Mon Sep 17 00:00:00 2001
|
||||
From: Axel Lin <axel.lin@gmail.com>
|
||||
Date: Sat, 14 May 2011 14:15:36 +0800
|
||||
Subject: [PATCH 02/13] mfd: Fix omap_usbhs_alloc_children error handling
|
||||
|
||||
1. Return proper error if omap_usbhs_alloc_child fails
|
||||
2. In the case of goto err_ehci, we should call platform_device_unregister(ehci)
|
||||
instead of platform_device_put(ehci) because we have already added the
|
||||
platform device to device hierarchy.
|
||||
|
||||
Signed-off-by: Axel Lin <axel.lin@gmail.com>
|
||||
Signed-off-by: Axel Lin <axel.lin@gmail.com>
|
||||
Tested-by: Keshava Munegowda <keshava_mgowda@ti.com>
|
||||
Acked-by: Felipe Balbi <balbi@ti.com>
|
||||
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||
---
|
||||
drivers/mfd/omap-usb-host.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
|
||||
index 55c5d47..1717144 100644
|
||||
--- a/drivers/mfd/omap-usb-host.c
|
||||
+++ b/drivers/mfd/omap-usb-host.c
|
||||
@@ -281,6 +281,7 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
|
||||
|
||||
if (!ehci) {
|
||||
dev_err(dev, "omap_usbhs_alloc_child failed\n");
|
||||
+ ret = -ENOMEM;
|
||||
goto err_end;
|
||||
}
|
||||
|
||||
@@ -304,13 +305,14 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
|
||||
sizeof(*ohci_data), dev);
|
||||
if (!ohci) {
|
||||
dev_err(dev, "omap_usbhs_alloc_child failed\n");
|
||||
+ ret = -ENOMEM;
|
||||
goto err_ehci;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_ehci:
|
||||
- platform_device_put(ehci);
|
||||
+ platform_device_unregister(ehci);
|
||||
|
||||
err_end:
|
||||
return ret;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
From edc881f9c4897fab11542cd5c36a33b288f702be Mon Sep 17 00:00:00 2001
|
||||
From: Keshava Munegowda <Keshava_mgowda@ti.com>
|
||||
Date: Sun, 22 May 2011 22:51:26 +0200
|
||||
Subject: [PATCH 03/13] mfd: Add omap-usbhs runtime PM support
|
||||
|
||||
The usbhs core driver does not enable/disable the interface and
|
||||
functional clocks; These clocks are handled by hwmod and runtime pm,
|
||||
hence insted of the clock enable/disable, the runtime pm APIS are
|
||||
used. however,the port clocks and tll clocks are handled
|
||||
by the usbhs core.
|
||||
|
||||
Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
|
||||
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
|
||||
---
|
||||
drivers/mfd/omap-usb-host.c | 131 +++----------------------------------------
|
||||
1 files changed, 9 insertions(+), 122 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
|
||||
index 1717144..8552195 100644
|
||||
--- a/drivers/mfd/omap-usb-host.c
|
||||
+++ b/drivers/mfd/omap-usb-host.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <plat/usb.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
|
||||
#define USBHS_DRIVER_NAME "usbhs-omap"
|
||||
#define OMAP_EHCI_DEVICE "ehci-omap"
|
||||
@@ -146,9 +147,6 @@
|
||||
|
||||
|
||||
struct usbhs_hcd_omap {
|
||||
- struct clk *usbhost_ick;
|
||||
- struct clk *usbhost_hs_fck;
|
||||
- struct clk *usbhost_fs_fck;
|
||||
struct clk *xclk60mhsp1_ck;
|
||||
struct clk *xclk60mhsp2_ck;
|
||||
struct clk *utmi_p1_fck;
|
||||
@@ -158,8 +156,6 @@ struct usbhs_hcd_omap {
|
||||
struct clk *usbhost_p2_fck;
|
||||
struct clk *usbtll_p2_fck;
|
||||
struct clk *init_60m_fclk;
|
||||
- struct clk *usbtll_fck;
|
||||
- struct clk *usbtll_ick;
|
||||
|
||||
void __iomem *uhh_base;
|
||||
void __iomem *tll_base;
|
||||
@@ -353,46 +349,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
|
||||
omap->platdata.ehci_data = pdata->ehci_data;
|
||||
omap->platdata.ohci_data = pdata->ohci_data;
|
||||
|
||||
- omap->usbhost_ick = clk_get(dev, "usbhost_ick");
|
||||
- if (IS_ERR(omap->usbhost_ick)) {
|
||||
- ret = PTR_ERR(omap->usbhost_ick);
|
||||
- dev_err(dev, "usbhost_ick failed error:%d\n", ret);
|
||||
- goto err_end;
|
||||
- }
|
||||
-
|
||||
- omap->usbhost_hs_fck = clk_get(dev, "hs_fck");
|
||||
- if (IS_ERR(omap->usbhost_hs_fck)) {
|
||||
- ret = PTR_ERR(omap->usbhost_hs_fck);
|
||||
- dev_err(dev, "usbhost_hs_fck failed error:%d\n", ret);
|
||||
- goto err_usbhost_ick;
|
||||
- }
|
||||
-
|
||||
- omap->usbhost_fs_fck = clk_get(dev, "fs_fck");
|
||||
- if (IS_ERR(omap->usbhost_fs_fck)) {
|
||||
- ret = PTR_ERR(omap->usbhost_fs_fck);
|
||||
- dev_err(dev, "usbhost_fs_fck failed error:%d\n", ret);
|
||||
- goto err_usbhost_hs_fck;
|
||||
- }
|
||||
-
|
||||
- omap->usbtll_fck = clk_get(dev, "usbtll_fck");
|
||||
- if (IS_ERR(omap->usbtll_fck)) {
|
||||
- ret = PTR_ERR(omap->usbtll_fck);
|
||||
- dev_err(dev, "usbtll_fck failed error:%d\n", ret);
|
||||
- goto err_usbhost_fs_fck;
|
||||
- }
|
||||
-
|
||||
- omap->usbtll_ick = clk_get(dev, "usbtll_ick");
|
||||
- if (IS_ERR(omap->usbtll_ick)) {
|
||||
- ret = PTR_ERR(omap->usbtll_ick);
|
||||
- dev_err(dev, "usbtll_ick failed error:%d\n", ret);
|
||||
- goto err_usbtll_fck;
|
||||
- }
|
||||
+ pm_runtime_enable(&pdev->dev);
|
||||
|
||||
omap->utmi_p1_fck = clk_get(dev, "utmi_p1_gfclk");
|
||||
if (IS_ERR(omap->utmi_p1_fck)) {
|
||||
ret = PTR_ERR(omap->utmi_p1_fck);
|
||||
dev_err(dev, "utmi_p1_gfclk failed error:%d\n", ret);
|
||||
- goto err_usbtll_ick;
|
||||
+ goto err_end;
|
||||
}
|
||||
|
||||
omap->xclk60mhsp1_ck = clk_get(dev, "xclk60mhsp1_ck");
|
||||
@@ -522,22 +485,8 @@ err_xclk60mhsp1_ck:
|
||||
err_utmi_p1_fck:
|
||||
clk_put(omap->utmi_p1_fck);
|
||||
|
||||
-err_usbtll_ick:
|
||||
- clk_put(omap->usbtll_ick);
|
||||
-
|
||||
-err_usbtll_fck:
|
||||
- clk_put(omap->usbtll_fck);
|
||||
-
|
||||
-err_usbhost_fs_fck:
|
||||
- clk_put(omap->usbhost_fs_fck);
|
||||
-
|
||||
-err_usbhost_hs_fck:
|
||||
- clk_put(omap->usbhost_hs_fck);
|
||||
-
|
||||
-err_usbhost_ick:
|
||||
- clk_put(omap->usbhost_ick);
|
||||
-
|
||||
err_end:
|
||||
+ pm_runtime_disable(&pdev->dev);
|
||||
kfree(omap);
|
||||
|
||||
end_probe:
|
||||
@@ -571,11 +520,7 @@ static int __devexit usbhs_omap_remove(struct platform_device *pdev)
|
||||
clk_put(omap->utmi_p2_fck);
|
||||
clk_put(omap->xclk60mhsp1_ck);
|
||||
clk_put(omap->utmi_p1_fck);
|
||||
- clk_put(omap->usbtll_ick);
|
||||
- clk_put(omap->usbtll_fck);
|
||||
- clk_put(omap->usbhost_fs_fck);
|
||||
- clk_put(omap->usbhost_hs_fck);
|
||||
- clk_put(omap->usbhost_ick);
|
||||
+ pm_runtime_disable(&pdev->dev);
|
||||
kfree(omap);
|
||||
|
||||
return 0;
|
||||
@@ -695,7 +640,6 @@ static int usbhs_enable(struct device *dev)
|
||||
struct usbhs_omap_platform_data *pdata = &omap->platdata;
|
||||
unsigned long flags = 0;
|
||||
int ret = 0;
|
||||
- unsigned long timeout;
|
||||
unsigned reg;
|
||||
|
||||
dev_dbg(dev, "starting TI HSUSB Controller\n");
|
||||
@@ -708,11 +652,7 @@ static int usbhs_enable(struct device *dev)
|
||||
if (omap->count > 0)
|
||||
goto end_count;
|
||||
|
||||
- clk_enable(omap->usbhost_ick);
|
||||
- clk_enable(omap->usbhost_hs_fck);
|
||||
- clk_enable(omap->usbhost_fs_fck);
|
||||
- clk_enable(omap->usbtll_fck);
|
||||
- clk_enable(omap->usbtll_ick);
|
||||
+ pm_runtime_get_sync(dev);
|
||||
|
||||
if (pdata->ehci_data->phy_reset) {
|
||||
if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) {
|
||||
@@ -736,50 +676,6 @@ static int usbhs_enable(struct device *dev)
|
||||
omap->usbhs_rev = usbhs_read(omap->uhh_base, OMAP_UHH_REVISION);
|
||||
dev_dbg(dev, "OMAP UHH_REVISION 0x%x\n", omap->usbhs_rev);
|
||||
|
||||
- /* perform TLL soft reset, and wait until reset is complete */
|
||||
- usbhs_write(omap->tll_base, OMAP_USBTLL_SYSCONFIG,
|
||||
- OMAP_USBTLL_SYSCONFIG_SOFTRESET);
|
||||
-
|
||||
- /* Wait for TLL reset to complete */
|
||||
- timeout = jiffies + msecs_to_jiffies(1000);
|
||||
- while (!(usbhs_read(omap->tll_base, OMAP_USBTLL_SYSSTATUS)
|
||||
- & OMAP_USBTLL_SYSSTATUS_RESETDONE)) {
|
||||
- cpu_relax();
|
||||
-
|
||||
- if (time_after(jiffies, timeout)) {
|
||||
- dev_dbg(dev, "operation timed out\n");
|
||||
- ret = -EINVAL;
|
||||
- goto err_tll;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- dev_dbg(dev, "TLL RESET DONE\n");
|
||||
-
|
||||
- /* (1<<3) = no idle mode only for initial debugging */
|
||||
- usbhs_write(omap->tll_base, OMAP_USBTLL_SYSCONFIG,
|
||||
- OMAP_USBTLL_SYSCONFIG_ENAWAKEUP |
|
||||
- OMAP_USBTLL_SYSCONFIG_SIDLEMODE |
|
||||
- OMAP_USBTLL_SYSCONFIG_AUTOIDLE);
|
||||
-
|
||||
- /* Put UHH in NoIdle/NoStandby mode */
|
||||
- reg = usbhs_read(omap->uhh_base, OMAP_UHH_SYSCONFIG);
|
||||
- if (is_omap_usbhs_rev1(omap)) {
|
||||
- reg |= (OMAP_UHH_SYSCONFIG_ENAWAKEUP
|
||||
- | OMAP_UHH_SYSCONFIG_SIDLEMODE
|
||||
- | OMAP_UHH_SYSCONFIG_CACTIVITY
|
||||
- | OMAP_UHH_SYSCONFIG_MIDLEMODE);
|
||||
- reg &= ~OMAP_UHH_SYSCONFIG_AUTOIDLE;
|
||||
-
|
||||
-
|
||||
- } else if (is_omap_usbhs_rev2(omap)) {
|
||||
- reg &= ~OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR;
|
||||
- reg |= OMAP4_UHH_SYSCONFIG_NOIDLE;
|
||||
- reg &= ~OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR;
|
||||
- reg |= OMAP4_UHH_SYSCONFIG_NOSTDBY;
|
||||
- }
|
||||
-
|
||||
- usbhs_write(omap->uhh_base, OMAP_UHH_SYSCONFIG, reg);
|
||||
-
|
||||
reg = usbhs_read(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
|
||||
/* setup ULPI bypass and burst configurations */
|
||||
reg |= (OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN
|
||||
@@ -919,6 +815,8 @@ end_count:
|
||||
return 0;
|
||||
|
||||
err_tll:
|
||||
+ pm_runtime_put_sync(dev);
|
||||
+ spin_unlock_irqrestore(&omap->lock, flags);
|
||||
if (pdata->ehci_data->phy_reset) {
|
||||
if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
|
||||
gpio_free(pdata->ehci_data->reset_gpio_port[0]);
|
||||
@@ -926,13 +824,6 @@ err_tll:
|
||||
if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
|
||||
gpio_free(pdata->ehci_data->reset_gpio_port[1]);
|
||||
}
|
||||
-
|
||||
- clk_disable(omap->usbtll_ick);
|
||||
- clk_disable(omap->usbtll_fck);
|
||||
- clk_disable(omap->usbhost_fs_fck);
|
||||
- clk_disable(omap->usbhost_hs_fck);
|
||||
- clk_disable(omap->usbhost_ick);
|
||||
- spin_unlock_irqrestore(&omap->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1005,11 +896,7 @@ static void usbhs_disable(struct device *dev)
|
||||
clk_disable(omap->utmi_p1_fck);
|
||||
}
|
||||
|
||||
- clk_disable(omap->usbtll_ick);
|
||||
- clk_disable(omap->usbtll_fck);
|
||||
- clk_disable(omap->usbhost_fs_fck);
|
||||
- clk_disable(omap->usbhost_hs_fck);
|
||||
- clk_disable(omap->usbhost_ick);
|
||||
+ pm_runtime_put_sync(dev);
|
||||
|
||||
/* The gpio_free migh sleep; so unlock the spinlock */
|
||||
spin_unlock_irqrestore(&omap->lock, flags);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,406 @@
|
||||
From 339b167f6f76707a2d6ae3a7c0b921b8278564af Mon Sep 17 00:00:00 2001
|
||||
From: Keshava Munegowda <Keshava_mgowda@ti.com>
|
||||
Date: Wed, 1 Jun 2011 11:02:49 -0700
|
||||
Subject: [PATCH 04/13] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4
|
||||
|
||||
Following 2 hwmod strcuture are added:
|
||||
UHH hwmod of usbhs with uhh base address and
|
||||
EHCI , OHCI irq and base addresses.
|
||||
TLL hwmod of usbhs with the TLL base address and irq.
|
||||
|
||||
Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 184 ++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 153 +++++++++++++++++++++++
|
||||
2 files changed, 337 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
index 909a84d..fe9a176 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
@@ -84,6 +84,8 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
|
||||
+static struct omap_hwmod omap34xx_usb_host_hs_hwmod;
|
||||
+static struct omap_hwmod omap34xx_usb_tll_hs_hwmod;
|
||||
|
||||
/* L3 -> L4_CORE interface */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
|
||||
@@ -3574,6 +3576,185 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * 'usb_host_hs' class
|
||||
+ * high-speed multi-port usb host controller
|
||||
+ */
|
||||
+static struct omap_hwmod_ocp_if omap34xx_usb_host_hs__l3_main_2 = {
|
||||
+ .master = &omap34xx_usb_host_hs_hwmod,
|
||||
+ .slave = &omap3xxx_l3_main_hwmod,
|
||||
+ .clk = "core_l3_ick",
|
||||
+ .user = OCP_USER_MPU,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class_sysconfig omap34xx_usb_host_hs_sysc = {
|
||||
+ .rev_offs = 0x0000,
|
||||
+ .sysc_offs = 0x0010,
|
||||
+ .syss_offs = 0x0014,
|
||||
+ .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
|
||||
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
|
||||
+ .sysc_fields = &omap_hwmod_sysc_type1,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class omap34xx_usb_host_hs_hwmod_class = {
|
||||
+ .name = "usbhs_uhh",
|
||||
+ .sysc = &omap34xx_usb_host_hs_sysc,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap34xx_usb_host_hs_masters[] = {
|
||||
+ &omap34xx_usb_host_hs__l3_main_2,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_irq_info omap34xx_usb_host_hs_irqs[] = {
|
||||
+ { .name = "ohci-irq", .irq = 76 },
|
||||
+ { .name = "ehci-irq", .irq = 77 },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_addr_space omap34xx_usb_host_hs_addrs[] = {
|
||||
+ {
|
||||
+ .name = "uhh",
|
||||
+ .pa_start = 0x48064000,
|
||||
+ .pa_end = 0x480643ff,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "ohci",
|
||||
+ .pa_start = 0x48064400,
|
||||
+ .pa_end = 0x480647FF,
|
||||
+ .flags = ADDR_MAP_ON_INIT
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "ehci",
|
||||
+ .pa_start = 0x48064800,
|
||||
+ .pa_end = 0x48064CFF,
|
||||
+ .flags = ADDR_MAP_ON_INIT
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap34xx_l4_cfg__usb_host_hs = {
|
||||
+ .master = &omap3xxx_l4_core_hwmod,
|
||||
+ .slave = &omap34xx_usb_host_hs_hwmod,
|
||||
+ .clk = "l4_ick",
|
||||
+ .addr = omap34xx_usb_host_hs_addrs,
|
||||
+ .addr_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_addrs),
|
||||
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap34xx_f128m_cfg__usb_host_hs = {
|
||||
+ .clk = "usbhost_120m_fck",
|
||||
+ .user = OCP_USER_MPU,
|
||||
+ .flags = OCPIF_SWSUP_IDLE,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap34xx_f48m_cfg__usb_host_hs = {
|
||||
+ .clk = "usbhost_48m_fck",
|
||||
+ .user = OCP_USER_MPU,
|
||||
+ .flags = OCPIF_SWSUP_IDLE,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap34xx_usb_host_hs_slaves[] = {
|
||||
+ &omap34xx_l4_cfg__usb_host_hs,
|
||||
+ &omap34xx_f128m_cfg__usb_host_hs,
|
||||
+ &omap34xx_f48m_cfg__usb_host_hs,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod omap34xx_usb_host_hs_hwmod = {
|
||||
+ .name = "usbhs_uhh",
|
||||
+ .class = &omap34xx_usb_host_hs_hwmod_class,
|
||||
+ .mpu_irqs = omap34xx_usb_host_hs_irqs,
|
||||
+ .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_irqs),
|
||||
+ .main_clk = "usbhost_ick",
|
||||
+ .prcm = {
|
||||
+ .omap2 = {
|
||||
+ .module_offs = OMAP3430ES2_USBHOST_MOD,
|
||||
+ .prcm_reg_id = 1,
|
||||
+ .module_bit = 0,
|
||||
+ .idlest_reg_id = 1,
|
||||
+ .idlest_idle_bit = 1,
|
||||
+ .idlest_stdby_bit = 0,
|
||||
+ },
|
||||
+ },
|
||||
+ .slaves = omap34xx_usb_host_hs_slaves,
|
||||
+ .slaves_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_slaves),
|
||||
+ .masters = omap34xx_usb_host_hs_masters,
|
||||
+ .masters_cnt = ARRAY_SIZE(omap34xx_usb_host_hs_masters),
|
||||
+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * 'usb_tll_hs' class
|
||||
+ * usb_tll_hs module is the adapter on the usb_host_hs ports
|
||||
+ */
|
||||
+static struct omap_hwmod_class_sysconfig omap34xx_usb_tll_hs_sysc = {
|
||||
+ .rev_offs = 0x0000,
|
||||
+ .sysc_offs = 0x0010,
|
||||
+ .syss_offs = 0x0014,
|
||||
+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE),
|
||||
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
+ .sysc_fields = &omap_hwmod_sysc_type1,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class omap34xx_usb_tll_hs_hwmod_class = {
|
||||
+ .name = "usbhs_tll",
|
||||
+ .sysc = &omap34xx_usb_tll_hs_sysc,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_irq_info omap34xx_usb_tll_hs_irqs[] = {
|
||||
+ { .name = "tll-irq", .irq = 78 },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_addr_space omap34xx_usb_tll_hs_addrs[] = {
|
||||
+ {
|
||||
+ .name = "tll",
|
||||
+ .pa_start = 0x48062000,
|
||||
+ .pa_end = 0x48062fff,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap34xx_f_cfg__usb_tll_hs = {
|
||||
+ .clk = "usbtll_fck",
|
||||
+ .user = OCP_USER_MPU,
|
||||
+ .flags = OCPIF_SWSUP_IDLE,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap34xx_l4_cfg__usb_tll_hs = {
|
||||
+ .master = &omap3xxx_l4_core_hwmod,
|
||||
+ .slave = &omap34xx_usb_tll_hs_hwmod,
|
||||
+ .clk = "l4_ick",
|
||||
+ .addr = omap34xx_usb_tll_hs_addrs,
|
||||
+ .addr_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_addrs),
|
||||
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap34xx_usb_tll_hs_slaves[] = {
|
||||
+ &omap34xx_l4_cfg__usb_tll_hs,
|
||||
+ &omap34xx_f_cfg__usb_tll_hs,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod omap34xx_usb_tll_hs_hwmod = {
|
||||
+ .name = "usbhs_tll",
|
||||
+ .class = &omap34xx_usb_tll_hs_hwmod_class,
|
||||
+ .mpu_irqs = omap34xx_usb_tll_hs_irqs,
|
||||
+ .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_irqs),
|
||||
+ .main_clk = "usbtll_ick",
|
||||
+ .prcm = {
|
||||
+ .omap2 = {
|
||||
+ .module_offs = CORE_MOD,
|
||||
+ .prcm_reg_id = 3,
|
||||
+ .module_bit = 2,
|
||||
+ .idlest_reg_id = 3,
|
||||
+ .idlest_idle_bit = 2,
|
||||
+ },
|
||||
+ },
|
||||
+ .slaves = omap34xx_usb_tll_hs_slaves,
|
||||
+ .slaves_cnt = ARRAY_SIZE(omap34xx_usb_tll_hs_slaves),
|
||||
+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
+};
|
||||
+
|
||||
static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
|
||||
&omap3xxx_l3_main_hwmod,
|
||||
&omap3xxx_l4_core_hwmod,
|
||||
@@ -3656,6 +3837,9 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
|
||||
/* usbotg for am35x */
|
||||
&am35xx_usbhsotg_hwmod,
|
||||
|
||||
+ &omap34xx_usb_host_hs_hwmod,
|
||||
+ &omap34xx_usb_tll_hs_hwmod,
|
||||
+
|
||||
NULL,
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
index abc548a..d7112b0 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -66,6 +66,8 @@ static struct omap_hwmod omap44xx_mmc2_hwmod;
|
||||
static struct omap_hwmod omap44xx_mpu_hwmod;
|
||||
static struct omap_hwmod omap44xx_mpu_private_hwmod;
|
||||
static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
|
||||
+static struct omap_hwmod omap44xx_usb_host_hs_hwmod;
|
||||
+static struct omap_hwmod omap44xx_usb_tll_hs_hwmod;
|
||||
|
||||
/*
|
||||
* Interconnects omap_hwmod structures
|
||||
@@ -5027,6 +5029,155 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * 'usb_host_hs' class
|
||||
+ * high-speed multi-port usb host controller
|
||||
+ */
|
||||
+static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
|
||||
+ .master = &omap44xx_usb_host_hs_hwmod,
|
||||
+ .slave = &omap44xx_l3_main_2_hwmod,
|
||||
+ .clk = "l3_div_ck",
|
||||
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = {
|
||||
+ .rev_offs = 0x0000,
|
||||
+ .sysc_offs = 0x0010,
|
||||
+ .syss_offs = 0x0014,
|
||||
+ .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
|
||||
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
|
||||
+ .sysc_fields = &omap_hwmod_sysc_type2,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
|
||||
+ .name = "usbhs_uhh",
|
||||
+ .sysc = &omap44xx_usb_host_hs_sysc,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = {
|
||||
+ &omap44xx_usb_host_hs__l3_main_2,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
|
||||
+ { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
|
||||
+ { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
|
||||
+ {
|
||||
+ .name = "uhh",
|
||||
+ .pa_start = 0x4a064000,
|
||||
+ .pa_end = 0x4a0647ff,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "ohci",
|
||||
+ .pa_start = 0x4A064800,
|
||||
+ .pa_end = 0x4A064BFF,
|
||||
+ .flags = ADDR_MAP_ON_INIT
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "ehci",
|
||||
+ .pa_start = 0x4A064C00,
|
||||
+ .pa_end = 0x4A064FFF,
|
||||
+ .flags = ADDR_MAP_ON_INIT
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
|
||||
+ .master = &omap44xx_l4_cfg_hwmod,
|
||||
+ .slave = &omap44xx_usb_host_hs_hwmod,
|
||||
+ .clk = "l4_div_ck",
|
||||
+ .addr = omap44xx_usb_host_hs_addrs,
|
||||
+ .addr_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_addrs),
|
||||
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = {
|
||||
+ &omap44xx_l4_cfg__usb_host_hs,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
|
||||
+ .name = "usbhs_uhh",
|
||||
+ .class = &omap44xx_usb_host_hs_hwmod_class,
|
||||
+ .mpu_irqs = omap44xx_usb_host_hs_irqs,
|
||||
+ .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_irqs),
|
||||
+ .main_clk = "usb_host_hs_fck",
|
||||
+ .prcm = {
|
||||
+ .omap4 = {
|
||||
+ .clkctrl_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
|
||||
+ },
|
||||
+ },
|
||||
+ .slaves = omap44xx_usb_host_hs_slaves,
|
||||
+ .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves),
|
||||
+ .masters = omap44xx_usb_host_hs_masters,
|
||||
+ .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters),
|
||||
+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * 'usb_tll_hs' class
|
||||
+ * usb_tll_hs module is the adapter on the usb_host_hs ports
|
||||
+ */
|
||||
+static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
|
||||
+ .rev_offs = 0x0000,
|
||||
+ .sysc_offs = 0x0010,
|
||||
+ .syss_offs = 0x0014,
|
||||
+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE),
|
||||
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
+ .sysc_fields = &omap_hwmod_sysc_type1,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
|
||||
+ .name = "usbhs_tll",
|
||||
+ .sysc = &omap44xx_usb_tll_hs_sysc,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
|
||||
+ { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
|
||||
+ {
|
||||
+ .name = "tll",
|
||||
+ .pa_start = 0x4a062000,
|
||||
+ .pa_end = 0x4a063fff,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
|
||||
+ .master = &omap44xx_l4_cfg_hwmod,
|
||||
+ .slave = &omap44xx_usb_tll_hs_hwmod,
|
||||
+ .clk = "l4_div_ck",
|
||||
+ .addr = omap44xx_usb_tll_hs_addrs,
|
||||
+ .addr_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_addrs),
|
||||
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = {
|
||||
+ &omap44xx_l4_cfg__usb_tll_hs,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
|
||||
+ .name = "usbhs_tll",
|
||||
+ .class = &omap44xx_usb_tll_hs_hwmod_class,
|
||||
+ .mpu_irqs = omap44xx_usb_tll_hs_irqs,
|
||||
+ .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_irqs),
|
||||
+ .main_clk = "usb_tll_hs_ick",
|
||||
+ .prcm = {
|
||||
+ .omap4 = {
|
||||
+ .clkctrl_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
|
||||
+ },
|
||||
+ },
|
||||
+ .slaves = omap44xx_usb_tll_hs_slaves,
|
||||
+ .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves),
|
||||
+ .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
+ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
|
||||
+};
|
||||
+
|
||||
static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
|
||||
|
||||
/* dmm class */
|
||||
@@ -5173,6 +5324,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
|
||||
&omap44xx_wd_timer2_hwmod,
|
||||
&omap44xx_wd_timer3_hwmod,
|
||||
|
||||
+ &omap44xx_usb_host_hs_hwmod,
|
||||
+ &omap44xx_usb_tll_hs_hwmod,
|
||||
NULL,
|
||||
};
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user