This document is a very high level analysis of the NVIDIA code found at the following repository:

http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git

This tree is Android specific several branches in the tree covering different releases (2.6.29, 2.6.32, 2.6.36) and tracking what appear to be NVIDIA platform support releases. The tree was compared to the Android tegra tree available at http://android.git.kernel.org/?p=kernel/tegra.git;a=summary and the changes in the NVIDIA release branches are primarily centered around adding platform support and fixing up drivers:

git diff --dirstat android-tegra/android-tegra-2.6.36..
  19.5% arch/arm/mach-tegra/nv/include/ap15/
  37.2% arch/arm/mach-tegra/nv/include/ap20/
   6.0% arch/arm/mach-tegra/nv/include/
   4.2% arch/arm/mach-tegra/nv/nvrm/
  12.9% arch/arm/mach-tegra/
  13.4% drivers/

Digging deeper into the arch/arm/mach-tegra code, we have:

 git diff --dirstat android-tegra/android-tegra-2.6.36.. -- arch/arm/mach-tegra/
  24.3% arch/arm/mach-tegra/nv/include/ap15/
  46.6% arch/arm/mach-tegra/nv/include/ap20/
   7.5% arch/arm/mach-tegra/nv/include/
   5.2% arch/arm/mach-tegra/nv/nvrm/
  16.2% arch/arm/mach-tegra/

The majority of changes are in ap15 and ap20 directories that are not in the upstream Android tree and hold various autogenerated header files that describe on-chip components. These headers are used by the code found in the nv subdirectory which seems to implement some sort of OS and HW abstraction layer for kernel and user space components, including Tegra's out-of-tree video driver. There are also a number of board.c files in the NVIDIA kernel that are not found in the upstream kernels (Ventana, Whistler, Cardhu, Enterprise, and VERBIER E1187). Some of these may be internal-only kits.

Doing a diff of NVIDIA's kernel vs stock 2.6.36 shows that the main differences are also in the ap15, ap20 directories along with a chunk of driver updates. NVIDIA also brings in the YAFFS2 out-of-tree file system.

  16.8% arch/arm/mach-tegra/nv/include/ap15/
  32.2% arch/arm/mach-tegra/nv/include/ap20/
   5.2% arch/arm/mach-tegra/nv/include/
   3.6% arch/arm/mach-tegra/nv/nvrm/
   7.7% arch/arm/mach-tegra/
   9.8% drivers/net/wireless/bcm4329/
   3.9% drivers/video/tegra/
  11.8% drivers/
   3.0% fs/yaffs2/

Digging into drivers:

   5.0% drivers/input/
   6.6% drivers/media/video/tegra/
   4.1% drivers/misc/mpu3050/
   8.1% drivers/net/wireless/bcm4329/include/
  24.0% drivers/net/wireless/bcm4329/
   3.5% drivers/staging/android/
   3.0% drivers/usb/gadget/
   7.2% drivers/video/tegra/dc/
   3.7% drivers/video/tegra/host/
   3.3% drivers/video/tegra/nvmap/
  31.0% drivers/

A large number of the changes are in the out-of-tree bcm4329 driver. In theory these devices should be supported by the in tree b43 driver if updated with the proper device ids, but testing would have to be done on the the NVIDIA platforms to validate that the specific chips on-board work and to fix any issues that may exist. The code in drivers/video/tegra is also completely out of tree and depends on the abstraction layer implemented in arch/arm/mach-tegra/nv and is not anywhere near upstream-acceptable at this time. drivers/misc/mpu3050 is another out of tree driver for the InvenSense MPU-3050 and MPU-6000 gyroscope chips, implementing a set of custom ioctl's via a miscdev. There was a driver submitted but not yet merged upstream that is much simpler and attaches to the input subsystem instead of providing a custom interface but further analysis of the code and the chip specs is needed to understand whether all required functionality is implemented.

Continuing to dig deeper into the driver diff, there are also out-of-tree drivers for the Tegra crypto units, the USB gadget interface, the SDHCI controller (which is also upstream but with a number of changes).

Overall this tree requires several man months of effort to go through the drivers and get them upstream-ready, including removing dependencies on their custom abstraction layer.

BSP/NVIDIA (last modified 2011-07-15 01:01:36)