I researched and tried a lot updating uart4 baud rate of Beaglebone green running Debian 9.4, but could not succeed. I am not even sure whether uart4 is enabled in Debian 9.4. As per am335x-boneblack.dts, uart4 is disabled and clock-frequency value is 0x2dc6c00 (this is for baudrate 115200 I guess). Answer I used termios library for uart configuration in linux.