pin mux settings in uboot and kernel

Hi all,

I am trying to understand how pin muxing is done in BBB in u-boot and kernel.My u boot version is and kernel version is 3.8.
I came to know about some files that contain mux settings,

/board/ti/am335x/mux.c
/arch/arm/include/asm/arch-am33xx/mux.h
/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
/board/ti/beagle/beagle.h
/board/ti/beagle/beagle.c

Which of these files actually mux the pins on BBB?